I just read http://www.stephenchu.com/2008/05/rails-composedof-validation.html
article... twice. He does a great job, but what I find really ugly
(so not Rails) is when I want to use ActiveRecord:Validations module
in my Value Object - I need to "stub out" some of the inner plumbing
to pretend I am really an ActiveRecord object.
Is this the best way to integrate Value Objects from aggregations into
Rails validation and error reporting? My googling so far turns up
more questions than answers.
The docs such as:
http://api.rubyonrails.org/classes/ActiveRecord/Aggregations/ClassMethods.html
talk about a lot but not about validation.
Please show me there is a more elegant, DRY, declarative way to
realize this than lots of custom code or the module inclusion pattern
written up by Steve Chu.
Thanks...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---