Commit 51685f651c2eac62ece7e0e7d7129a231bce9ff6
1 parent
ac868038
Exists in
master
and in
29 other branches
Alias enterprise methods
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
app/models/product.rb
... | ... | @@ -17,6 +17,9 @@ class Product < ActiveRecord::Base |
17 | 17 | |
18 | 18 | belongs_to :enterprise, :foreign_key => :profile_id, :class_name => 'Profile' |
19 | 19 | belongs_to :profile |
20 | + alias_method :enterprise=, :profile= | |
21 | + alias_method :enterprise, :profile | |
22 | + | |
20 | 23 | has_one :region, :through => :enterprise |
21 | 24 | validates_presence_of :enterprise |
22 | 25 | ... | ... |