Let I have several models, and one method that must validate them.
I want to keep my code DRY, so how I must attach code to several models?
Let I have several models, and one method that must validate them.
I want to keep my code DRY, so how I must attach code to several models?
Hi!
Search for “rails custom validators”
http://www.perfectline.ee/blog/building-ruby-on-rails-3-custom-validators
Best Regards,
Everaldo
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs