Luan Nguyen
1 min readJan 1, 2019

--

Hi Femi Olubode,

In this article, I explained detail about this Forbidden Attributes Error, you have to use strong parameters before updating the user.

def user_params
params.require(:user).permit(:username, :name, :website,
:bio, :email, :phone, :gender)
end

and then,

current_user.update(user_params)

Cheers,

Luan Nguyen

--

--

Luan Nguyen
Luan Nguyen

Written by Luan Nguyen

🚀 Solutions Architect @ ITviec.com — Interested in Ruby on Rails, Design Pattern, Clean Code, TDD, Performance, Scalability — github.com/thanhluanuit

No responses yet