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 can validate against a model attribute if you use a Proc.
In rails4 you would do something like this:
class Trip < ActiveRecord::Base
validates_numericality_of :start_odometer, less_than: ->(trip) { trip.end_odometer }
validates_numericality_of :end_odometer, greater_than: ->(trip) { trip.start_odometer }
end