On Thu, Jul 10, 2008 at 3:40 AM, Michael Koziarski <[EMAIL PROTECTED]>
wrote:
Without attributing Ruy Asan who wrote:

>
> > It has come to my attention the above wall of text is a little
> > intimidating and is holding back adoption ;)
>
> Quite ;)
>
> > So I present to you a summary, in ADD-friendly, fixed-with 68-char
> > column formatted (to appease google's crazy ML reader) point form:
> >
> > - I re-wrote ActiveModel::Validations -> renamed to
> >  ActiveMoldel::Validatable
> >  - Inspired by the Validatable gem (sort of)
> >  - Would like to replace ActiveRecord::Validation with it
>
> Rick's the guy to talk with about this stuff, he's been more vocal
> about about changing active record's validations to be based on active
> model's.
> ...
> > That's the gist of it!
>
> Nice work.
>
> If I can make a process related comment though, it would have been
> cool to bounce some of these ideas around here first before dropping
> such a large patch.  You could have got a few people to help out and
> got feed back on the API before you had code and tests that'd need
> changing.
>

In any event, I'm glad to see this come up.  Not having looked at the
actually code in the patch, this looks like it might help address my current
pet peeve about rails validations which is that the walkbacks you get when a
validation throws an exception are pretty much worthless for determining
WHICH validation failed.

The app I work on for a living is complex and has lots of validations and
observers.  I've had to table moving to Rails 2.1 because it now seems to
run validations more often, and debugging the resultant chaos was taking
more time than it was worth.  If the new implementation leaves more clues on
the invocation stack in these cases, I'd be all for it.

Another benefit of what I'm reading is that it would make validations
reflectable which would help in writing TDD/BDD assertions/matchers that a
model did or did not validate certain things.

-- 
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to