diff --git a/app/controllers/clearance/users_controller.rb b/app/controllers/clearance/users_controller.rb index f9afd8e5..ccece588 100644 --- a/app/controllers/clearance/users_controller.rb +++ b/app/controllers/clearance/users_controller.rb @@ -31,16 +31,11 @@ def url_after_create end def user_from_params - email = user_params.delete(:email) - password = user_params.delete(:password) - - Clearance.configuration.user_model.new(user_params).tap do |user| - user.email = email - user.password = password - end + Clearance.configuration.user_model.new(user_params) end def user_params - params[Clearance.configuration.user_parameter] || {} + params.fetch(Clearance.configuration.user_parameter, {}). + permit(:email, :password) end end