I\'ve got a Trip model, which among other attributes has a start_odometer and end_odometer value. In my model, i\'d like to validate that the end odometer is larger than the st
You'll probably need to write a custom validation method in your model for this...
validate :odometer_value_order
def odometer_value_order
if self.end_odometer && (self.start_odometer > self.end_odometer)
self.errors.add_to_base("End odometer value must be greater than start odometer value.")
end
end