attr_accessible allows you to define a whitelist of attributes on a model that can be assigned to the mass. Therefore, if you have 10 attrs, but only 3 from the white list, only those three can be assigned as mass.
class Foo < ActiveRecord:Base
attr_accessible :one, :two
end
Foo.new({:one => 1, :two => 2})
Foo.new({:one => 1, :two => 2, :three => 3})
source
share