From: Jean-Philippe Lang Date: Fri, 5 Dec 2014 12:37:00 +0000 (+0000) Subject: Removed dead code, Rails4 handles that in its attribute writer. X-Git-Tag: 3.0.0~272 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8992dc9f93dc9b19652614efe23547e77b123917;p=redmine.git Removed dead code, Rails4 handles that in its attribute writer. git-svn-id: http://svn.redmine.org/redmine/trunk@13716 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/time_entry.rb b/app/models/time_entry.rb index c875afbb1..870b15548 100644 --- a/app/models/time_entry.rb +++ b/app/models/time_entry.rb @@ -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