app/models/polymorphic/task.rb in fat_free_crm-0.11.4 vs app/models/polymorphic/task.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: tasks
#
# id :integer not null, primary key
@@ -242,13 +230,15 @@
def specific_time
parse_calendar_date if self.bucket == "specific_time"
rescue ArgumentError
errors.add(:calendar, :invalid_date)
end
-
+
#----------------------------------------------------------------------------
def parse_calendar_date
# always in 2012-10-28 06:28 format regardless of language
Time.parse(self.calendar)
end
+
+ ActiveSupport.run_load_hooks(:fat_free_crm_task, self)
end