diff --git a/app/models/environment.rb b/app/models/environment.rb index c20ff62..6734772 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -735,6 +735,13 @@ class Environment < ActiveRecord::Base end end + after_create :create_default_licenses + def create_default_licenses + #TODO Must create here the default licenses. Also needs to create a + # migration to create these licenses to environments that alaready + # exists + end + def highlighted_products_with_image(options = {}) Product.find(:all, {:conditions => {:highlighted => true, :enterprise_id => self.enterprises.find(:all, :select => :id) }, :joins => :image}.merge(options)) end -- libgit2 0.21.2