← Back to Upcase

attr_accessible in rails 4

(Shankar Dhanasekaran) #1

I am watching the intro workshop but using rails 4 and trying to see where things change. One thing that I noticed now is that while in rails 3, it gave an mass-assignment protect attributes error when trying to create an object by passing an hash value in Model.new, it doesn’t give the same error in my rails 4.

Where can I find more information about it? I did a google search but nothing comes up for this particularly.

Any help?

(Manish Valechha) #2

Hi Shankard,

This link has a good write up on mass-assignment: http://net.tutsplus.com/tutorials/ruby/mass-assignment-rails-and-you/