It does not mean converting a character to an integer

I am using rails 4.0.1 and ruby ​​2.0.0 with development 3.2.2. I keep getting this problem when a user tries to change their account. I have my strong options in application_controller.rb and a custom update controller that looks like this:

class RegistrationsController <Develop :: RegistrationsController

def update
    # For Rails 4
    account_update_params = devise_parameter_sanitizer.for(:account_update)
    @user = User.find(current_user.id)
    @user.balanced_associate_token_with_customer(account_update_params)
    if @user.update_with_password(account_update_params)
      set_flash_message :notice, :updated
      # Sign in the user bypassing validation in case his password changed
      sign_in @user, :bypass => true
      redirect_to after_update_path_for(@user)
    else
      render "edit"
    end
end 

protected def after_update_path_for (resource) user_path (resource) end end

I was pulling my hair from yesterday ... any help would be appreciated. Let me know if you need more information.

Edited: The only thing that changed before I noticed the error is that the developer starts asking for config.secret_key in the development of the initialization file.

:

devise (3.2.2) lib/devise/models/database_authenticatable.rb:64:in `[]'
devise (3.2.2) lib/devise/models/database_authenticatable.rb:64:in `update_with_password'
app/controllers/registrations_controller.rb:12:in `update'
actionpack (4.0.2) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (4.0.2) lib/abstract_controller/base.rb:189:in `process_action'

!

+3
1

. , - . , Devise . :

account_update_params = devise_parameter_sanitizer.for(: account_update)

:

@user.update_with_password (account_update_params)

@user.update_with_password (devise_parameter_sanitizer.sanitize(: account_update))

. .

+6

All Articles