Skip to content
Snippets Groups Projects
Commit 41456db4 authored by Mateus Rambo Strey's avatar Mateus Rambo Strey
Browse files

Merge branch 'fix-user.sign_in' into 'master'

fix(User.singin): fix the 'configure_permitted_parameters' from user_controller



See merge request !263
parents 393f3379 8543d55f
No related branches found
No related tags found
No related merge requests found
......@@ -23,13 +23,13 @@ class ApplicationController < ActionController::API
registration_params = [:name, :email, :avatar, :password, :password_confirmation]
if params[:action] == 'update'
devise_parameter_sanitizer.for(:account_update) {
|u| u.permit(registration_params << :current_password)
}
devise_parameter_sanitizer.permit(:account_update) do |user_params|
user_params.permit(registration_params << :current_password)
end
elsif params[:action] == 'create'
devise_parameter_sanitizer.for(:sign_up) {
|u| u.permit(registration_params << :terms_of_service)
}
devise_parameter_sanitizer.permit(:sign_in) do |user_params|
user_params.permit(registration_params << :terms_of_service)
end
end
end
......@@ -38,5 +38,4 @@ class ApplicationController < ActionController::API
def user_not_authorized
render nothing: true, status: :unauthorized
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment