Valid Attributes plugin
Plugin details
Documentation
Install the plugin:
ruby script/plugin install http://valid-attributes.googlecode.com/svn/tags/valid_attributes
Usage:
@foo= Foo.new if @foo.valid_attributes?(:attr1) end if @foo.valid_attributes?(:only => [:attr1, :attr2]) end if @foo.valid_attributes?(:except => [:attr3, :attr4]) end if @foo.save_with_valid_attributes(:only => [:attr1, :attr2]) end if @foo.save_with_valid_attributes(:except => [:attr3, :attr4]) end begin @foo.save_with_valid_attributes!(:only => [:attr1, :attr2]) rescue ActiveRecord::RecordInvalid => e # validation error end
Further Documentation
There is currently no advanced documentation for this plugin.
New documentationEdit plugin | Back in time (7 older versions) | Last edited by: scott, 3 months ago

