search for: check_a_or_b_is_set

Displaying 1 result from an estimated 1 matches for "check_a_or_b_is_set".

2006 Apr 01
4
Custom Validations
Does anyone how to create a validation that: validates_presence_of :a OR :b I.e. :a OR :b must be present. I thought this would probably be possible with some kind of validation callback, e.g.: def check_a_or_b_is_set return (a or b) end Any ideas? Thanks, Rob -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060401/02eeb48a/attachment.html