If in a model file I have just this code:
class Users < ActiveRecord::Base
end
what this means? All attributes related to the model are accessible or not?
How I can set 'attr_accessible' in order to not allow access to any of the fields for that model?
Just set:
class Users < ActiveRecord::Base
attr_accessible #none
end
Like Pan Thomakos said (attr_accessible is the array of parameters that can be mass-ret. So if you send in no symbols, then no parameters will be accessible.
This ticket was useful
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With