Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad configuration if selecting devise invitable. #246

Open
modreoci opened this issue Apr 11, 2016 · 0 comments
Open

Bad configuration if selecting devise invitable. #246

modreoci opened this issue Apr 11, 2016 · 0 comments

Comments

@modreoci
Copy link

If devise invitable gem is selected in custom app it does not properly set application controller for that gem. There is missing addition of this code:

before_filter :configure_permitted_parameters, if: :devise_controller?

protected

def configure_permitted_parameters
  # Only add some parameters
  devise_parameter_sanitizer.for(:accept_invitation).concat [:first_name, :last_name, :phone]
  # Override accepted parameters
  devise_parameter_sanitizer.for(:accept_invitation) do |u|
    u.permit(:first_name, :last_name, :phone, :password, :password_confirmation,
             :invitation_token)
  end
end

to the application_controller.rb according to README

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant