mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Do not fill in passwords fields on failure.
This commit is contained in:
parent
eb4437adaf
commit
d3f9e9c2a1
1 changed files with 5 additions and 2 deletions
|
@ -78,9 +78,12 @@ module Devise
|
|||
instance_variable_set(:"@#{resource_name}", new_resource)
|
||||
end
|
||||
|
||||
# Build a devise resource
|
||||
# Build a devise resource without setting password and password confirmation fields.
|
||||
def build_resource
|
||||
self.resource = resource_class.new(params[resource_name])
|
||||
self.resource ||= begin
|
||||
attributes = params[resource_name].try(:except, :password, :password_confirmation)
|
||||
resource_class.new(attributes)
|
||||
end
|
||||
end
|
||||
|
||||
# Helper for use in before_filters where no authentication is required.
|
||||
|
|
Loading…
Reference in a new issue