rails-composer
rails-composer copied to clipboard
Bad configuration if selecting devise invitable.
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