Class: Mks::Rent::RequestItem

Inherits:
ApplicationRecord show all
Defined in:
app/models/mks/rent/request_item.rb

Instance Method Summary collapse

Methods inherited from ApplicationRecord

#json, json

Instance Method Details

#validate_date_rangeObject



12
13
14
# File 'app/models/mks/rent/request_item.rb', line 12

def validate_date_range
  errors.add(:from, :invalid_range, low: from, high: to) if from && to && from > to
end