[ANN] Singleton Validations plugin

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!

Hi –

My chaining of method_missing wasn’t behaving well with missing
methods of the form validates_blah, so I’ve fixed it and added a test.

David

On Fri, 4 Jul 2008, David A. Black wrote:

and so on.
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!


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!