11

I have the update method in user managements controller like this

def update
  @user.update(user_permitted_params)
  redirect_to admin_user_managements_path
end

My strong parameters is set as

def user_permitted_params
  params.require(:user).permit(:name, :email, :password,
  :password_confirmation,
  :address, :zip_code,
  :phone_number, :role_id)
end

I am getting following issue

Unpermitted parameters: utf8, _method, authenticity_token, user, commit

fool-dev
  • 7,671
  • 9
  • 40
  • 54
kurian mathew
  • 111
  • 1
  • 3

1 Answers1

1

I tried your code myself and the only explanation for your error is that you must have called @user.update(params) at some point.

Christian
  • 4,902
  • 4
  • 24
  • 42
Thomas R. Koll
  • 3,131
  • 1
  • 19
  • 26