[Rails] Re: DRY model validation question
Thanks, Stephan, Ar & Lake! Ar: sorry about the sloppy use of the
word "combine" -- I meant refactor :)
On Oct 6, 12:36 pm, Lake Denman <rails-mailing-l...@andreas-s.net>
wrote:
> Hi Craig,
>
> My solution to this problem can be found here:
>
> http://gist.github.com/203225
>
> Basically, I just add the validations in a module as instance methods
> (def foo..), include that module in the models, and as the module is
> included, tell the "klass" to validate the instance methods.
>
> Make sense?
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home