Written February 6, 2008. Tagged Ruby.
The new version is a plugin and can be used outside tests as well. It supports unprotected versions of
new. ActiveRecord::Base gets a
with_unprotected_attributes class method. Pass it a block and anything inside will be done with unprotected attributes.
Save that file as
vendor/plugins/with_unprotected_attributes/init.rb, or stick it in
environment.rb, or put it in a file in
lib and require it.