Ruby on Rails Monday, April 28, 2014

Why don't you try creating a concern and decorate the class with that concern that contains the validations?

you can have a look here: http://stackoverflow.com/questions/11372484/rails-put-validation-in-a-module-mixin and here: http://blog.andywaite.com/2012/12/23/exploring-concerns-for-rails-4/

does this needs to be done in run time?

hope it helps.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c678a4be-b99d-4186-9d82-d2ef0222b641%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment