@@ -104,9 +104,6 class TimeEntry < ActiveRecord::Base | |||
|
104 | 104 | # these attributes make time aggregations easier |
|
105 | 105 | def spent_on=(date) |
|
106 | 106 | super |
|
107 | if spent_on.is_a?(Time) | |
|
108 | self.spent_on = spent_on.to_date | |
|
109 | end | |
|
110 | 107 | self.tyear = spent_on ? spent_on.year : nil |
|
111 | 108 | self.tmonth = spent_on ? spent_on.month : nil |
|
112 | 109 | self.tweek = spent_on ? Date.civil(spent_on.year, spent_on.month, spent_on.day).cweek : nil |
General Comments 0
You need to be logged in to leave comments.
Login now