]> source.dussan.org Git - redmine.git/commitdiff
Removed dead code, Rails4 handles that in its attribute writer.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 5 Dec 2014 12:37:00 +0000 (12:37 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 5 Dec 2014 12:37:00 +0000 (12:37 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@13716 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/time_entry.rb

index c875afbb1df9186fda1a953b65ab6125df15792c..870b1554867e397739a48ab27b976cce12f0c5ee 100644 (file)
@@ -104,9 +104,6 @@ class TimeEntry < ActiveRecord::Base
   # these attributes make time aggregations easier
   def spent_on=(date)
     super
-    if spent_on.is_a?(Time)
-      self.spent_on = spent_on.to_date
-    end
     self.tyear = spent_on ? spent_on.year : nil
     self.tmonth = spent_on ? spent_on.month : nil
     self.tweek = spent_on ? Date.civil(spent_on.year, spent_on.month, spent_on.day).cweek : nil