Fix for acts_as_audited and attr_accessible
The biggest complaint I get about acts_as_audited is finally fixed: if you want to use acts_as_audited on a model that uses attr_accessible
, you can set the :protect
option to false
:
This will prevent acts_as_audited from using attr_protected
, which would cause Active Record to raise an error in combination with attr_accessible
.
Get the latest code from GitHub
Update: Timothy N. Jones had a good suggestion to automatically disable attr_protected
if attr_accessible
has already been called. I updated acts_as_audited, so now you only have to set :protect
to false if you are declaring attr_accessible
after you call acts_as_audited.