1
0
Fork 0
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:
Ulisses Almeida 2016-04-22 20:36:55 -03:00
parent 48220f087b
commit 90acc6fc23

View file

@ -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)