mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Change the check for permit!
method
We are using the `permit!` method, we should check for `permit!`.
This commit is contained in:
parent
48220f087b
commit
90acc6fc23
1 changed files with 1 additions and 1 deletions
|
@ -253,7 +253,7 @@ module Devise
|
|||
|
||||
# Find or initialize a record with group of attributes based on a list of required attributes.
|
||||
def find_or_initialize_with_errors(required_attributes, attributes, error=:invalid) #:nodoc:
|
||||
attributes = if attributes.respond_to? :permit
|
||||
attributes = if attributes.respond_to? :permit!
|
||||
attributes.slice(*required_attributes).permit!.to_h.with_indifferent_access
|
||||
else
|
||||
attributes.with_indifferent_access.slice(*required_attributes)
|
||||
|
|
Loading…
Reference in a new issue