Commit 94e57decf45d698d67715c72643c42fb12add5e2
1 parent
49ee3a7a
Exists in
master
and in
29 other branches
[licenses] Default licenses (todo)
(ActionItem2379)
Showing
1 changed file
with
7 additions
and
0 deletions
Show diff stats
app/models/environment.rb
@@ -735,6 +735,13 @@ class Environment < ActiveRecord::Base | @@ -735,6 +735,13 @@ class Environment < ActiveRecord::Base | ||
735 | end | 735 | end |
736 | end | 736 | end |
737 | 737 | ||
738 | + after_create :create_default_licenses | ||
739 | + def create_default_licenses | ||
740 | + #TODO Must create here the default licenses. Also needs to create a | ||
741 | + # migration to create these licenses to environments that alaready | ||
742 | + # exists | ||
743 | + end | ||
744 | + | ||
738 | def highlighted_products_with_image(options = {}) | 745 | def highlighted_products_with_image(options = {}) |
739 | Product.find(:all, {:conditions => {:highlighted => true, :enterprise_id => self.enterprises.find(:all, :select => :id) }, :joins => :image}.merge(options)) | 746 | Product.find(:all, {:conditions => {:highlighted => true, :enterprise_id => self.enterprises.find(:all, :select => :id) }, :joins => :image}.merge(options)) |
740 | end | 747 | end |