Class: Logistics::Core::InterCityRoute

Inherits:
Route show all
Defined in:
app/models/logistics/core/inter_city_route.rb

Instance Method Summary collapse

Methods inherited from Route

fetch_all, #route_name, route_type

Methods inherited from ApplicationRecord

as_json

Instance Method Details

#check_from_id_and_to_idObject



8
9
10
# File 'app/models/logistics/core/inter_city_route.rb', line 8

def check_from_id_and_to_id
  errors.add(:from_id, "can't be the same as to.") if from_id == to_id
end