aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/ship.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/models/ship.rb')
-rw-r--r--activerecord/test/models/ship.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/ship.rb b/activerecord/test/models/ship.rb
index fcc533380b..95172e4d3e 100644
--- a/activerecord/test/models/ship.rb
+++ b/activerecord/test/models/ship.rb
@@ -22,6 +22,7 @@ end
class ShipWithoutNestedAttributes < ActiveRecord::Base
self.table_name = "ships"
has_many :prisoners, inverse_of: :ship, foreign_key: :ship_id
+ has_many :parts, class_name: "ShipPart", foreign_key: :ship_id
validates :name, presence: true
end