Skip to content
This repository
Browse code

Do not send nil to build (Datamapper compability)

  • Loading branch information...
commit d5049240e2a808acb509e9d639995e7f36e21776 1 parent 529cd8b
José Valim josevalim authored

Showing 2 changed files with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 0  CHANGELOG.rdoc
  2. +1 1  lib/devise/controllers/helpers.rb
3  CHANGELOG.rdoc
Source Rendered
... ... @@ -1,3 +1,6 @@
  1 +* enhancements
  2 + * [#42] Do not send nil to build (DataMapper compatibility)
  3 +
1 4 == 0.5.5
2 5
3 6 * enhancements
2  lib/devise/controllers/helpers.rb
@@ -59,7 +59,7 @@ def resource=(new_resource)
59 59 def build_resource
60 60 self.resource ||= begin
61 61 attributes = params[resource_name].try(:except, :password, :password_confirmation)
62   - resource_class.new(attributes)
  62 + resource_class.new(attributes || {})
63 63 end
64 64 end
65 65

0 comments on commit d504924

Please sign in to comment.
Something went wrong with that request. Please try again.