app/models/entities/campaign.rb in fat_free_crm-0.11.4 vs app/models/entities/campaign.rb in fat_free_crm-0.12.0
- old
+ new
@@ -1,22 +1,10 @@
-# Fat Free CRM
-# Copyright (C) 2008-2011 by Michael Dvorkin
+# Copyright (c) 2008-2013 Michael Dvorkin and contributors.
#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Fat Free CRM is freely distributable under the terms of MIT license.
+# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
-
# == Schema Information
#
# Table name: campaigns
#
# id :integer not null, primary key
@@ -117,7 +105,9 @@
# Make sure at least one user has been selected if the campaign is being shared.
#----------------------------------------------------------------------------
def users_for_shared_access
errors.add(:access, :share_campaign) if self[:access] == "Shared" && !self.permissions.any?
end
+
+ ActiveSupport.run_load_hooks(:fat_free_crm_campaign, self)
end