2017-07-09 13:41:28 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2013-05-09 13:08:44 -04:00
|
|
|
class Hotel < ActiveRecord::Base
|
|
|
|
has_many :departments
|
|
|
|
has_many :chefs, through: :departments
|
2016-08-06 12:26:20 -04:00
|
|
|
has_many :cake_designers, source_type: "CakeDesigner", source: :employable, through: :chefs
|
|
|
|
has_many :drink_designers, source_type: "DrinkDesigner", source: :employable, through: :chefs
|
2016-01-24 11:33:00 -05:00
|
|
|
|
|
|
|
has_many :chef_lists, as: :employable_list
|
2016-08-06 13:37:57 -04:00
|
|
|
has_many :mocktail_designers, through: :chef_lists, source: :employable, source_type: "MocktailDesigner"
|
2016-01-24 11:33:00 -05:00
|
|
|
|
2015-03-15 10:33:29 -04:00
|
|
|
has_many :recipes, through: :chefs
|
2013-05-09 13:08:44 -04:00
|
|
|
end
|