aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/hotel.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/models/hotel.rb')
-rw-r--r--activerecord/test/models/hotel.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/models/hotel.rb b/activerecord/test/models/hotel.rb
new file mode 100644
index 0000000000..b352cd22f3
--- /dev/null
+++ b/activerecord/test/models/hotel.rb
@@ -0,0 +1,6 @@
+class Hotel < ActiveRecord::Base
+ has_many :departments
+ has_many :chefs, through: :departments
+ has_many :cake_designers, source_type: 'CakeDesigner', source: :employable, through: :chefs
+ has_many :drink_designers, source_type: 'DrinkDesigner', source: :employable, through: :chefs
+end