plataformatec/devise — Issue #1377: `hash` in method `build_resource` will never be populated with params[resource_name]
Author: stevenringo
Created: 2011-10-12 04:26:36+00:00
State: open

Calling `New` in `Devise::RegistrationsController`:

```ruby
def new
resource = build_resource
respond_with_navigational(resource){ render_with_scope :new }
end
```

If we look at `build_resource`, `hash` will never be populated with `params[resource_name]`, unless `new` is overridden

```ruby
def build_resource(hash=nil)
hash ||= params[resource_name] || {}
self.resource = resource_class.new_with_session(hash, session)
end
````
Surely the implementation should be?:

```ruby
def new
resource = build_resource
respond_with_navigational(resource){ render_with_scope :new }
end
```

Or, is the assumption that one will override the implementation of `new`?