From 8992dc9f93dc9b19652614efe23547e77b123917 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 5 Dec 2014 12:37:00 +0000 Subject: [PATCH] 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 --- app/models/time_entry.rb | 3 --- 1 file changed, 3 deletions(-) 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 -- 2.39.5