13 lines
203 B
Ruby
13 lines
203 B
Ruby
class Aircraft < ApplicationRecord
|
|
has_one :inspection
|
|
has_many :engine
|
|
has_many :flights
|
|
|
|
validates :reg, presence: true
|
|
validates :serial, presence: true
|
|
|
|
def to_s
|
|
return reg
|
|
end
|
|
end
|