Hi –
Inspired by a question from ‘mickey’ on IRC (mickey, where art thou?),
I have written a plugin that lets you do class-style validations on
individual ActiveRecord objects, like this:
t = Thing.new
t.validates_size_of :name, :minimum => 5
and so on.
It’s at
http://www.risleydale.net/svn/plugins/singleton_validations/trunk
Enjoy, and let me know if any questions or problems.
David
–
Rails training from David A. Black and Ruby Power and Light:
Intro to Ruby on Rails July 21-24 Edison, NJ
Advancing With Rails August 18-21 Edison, NJ
See http://www.rubypal.com for details and updates!