Add & Display Flights
This commit is contained in:
12
app/models/aircraft.rb
Normal file
12
app/models/aircraft.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
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
|
||||
Reference in New Issue
Block a user