Frederick C. wrote:
On Aug 12, 9:47ï¿½am, Jamal S. [email protected]
I’m facing a small issue here with protected columns from being updated.
So I thought attr_protected is the solution, but this destroy my
creation of user?
attr_protected means you cannot assign the attribute using create (or
It does not mean that you can’t do user.email = ‘…’
Thanks for fast answer.
well, that’s a problem then because I need to assign everything myself?
In my controller I did this normally.
For new user
@user = User.new(params[:user])
@user = session[:user] // when logged in
Is this wrong?
When can I use before_update and before_create to handle these cases?
I also think update_attributes goes through all the columns before
updating to check if any variable has changed :S