From 94e57decf45d698d67715c72643c42fb12add5e2 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Wed, 18 Jul 2012 11:28:24 -0300 Subject: [PATCH] [licenses] Default licenses (todo) --- app/models/environment.rb | 7 +++++++ 1 file changed, 7 insertions(+), 0 deletions(-) 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