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 acce
By default the attributes are all attr_accessible (which means they can be set my mass-assignment).
To disable mass-assignment entirely, use something like this:
ActiveRecord::Base.send(:attr_accessible, nil)
This command will disable mass-assignment for all active record objects, but you can specify one or more models to perform this command on if you want mass-assignment in some cases but not in others.