Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- validates :one_of_these_is_greater_than_zero?
- def one_of_these_is_greater_than_zero?
- errors.add_to_base("one of these must be greater than zero!") and return false unless field1 > 0 || field2 > 0 || field3 > 0
- end
Add Comment
Please, Sign In to add comment