Commit cfc661bf65a8f888b76b715b33cbaa22e3994d40
Exists in
master
and in
29 other branches
Merge remote-tracking branch 'origin/master'
Showing
2 changed files
with
10 additions
and
1 deletions
Show diff stats
app/models/enterprise.rb
@@ -19,7 +19,8 @@ class Enterprise < Organization | @@ -19,7 +19,8 @@ class Enterprise < Organization | ||
19 | has_many :inputs, :through => :products | 19 | has_many :inputs, :through => :products |
20 | has_many :production_costs, :as => :owner | 20 | has_many :production_costs, :as => :owner |
21 | 21 | ||
22 | - has_and_belongs_to_many :fans, :class_name => 'Person', :join_table => 'favorite_enteprises_people' | 22 | + has_many :favorite_enterprise_people |
23 | + has_many :fans, through: :favorite_enterprise_people, source: :person | ||
23 | 24 | ||
24 | def product_categories | 25 | def product_categories |
25 | ProductCategory.by_enterprise(self) | 26 | ProductCategory.by_enterprise(self) |