Commit 94e57decf45d698d67715c72643c42fb12add5e2

Authored by Rodrigo Souto
1 parent 49ee3a7a

[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 735 end
736 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 745 def highlighted_products_with_image(options = {})
739 746 Product.find(:all, {:conditions => {:highlighted => true, :enterprise_id => self.enterprises.find(:all, :select => :id) }, :joins => :image}.merge(options))
740 747 end
... ...