summaryrefslogtreecommitdiffstats
path: root/app/controllers/timelog_controller.rb
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-09-14 19:02:20 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-09-14 19:02:20 +0000
commit8900797adaf29adc447925b800d5457ca941795f (patch)
tree44b77bb09d58df8879251c3a2f96de6f27597264 /app/controllers/timelog_controller.rb
parent1b90703157a182d37496ae4c8e3c430681abddc0 (diff)
downloadredmine-8900797adaf29adc447925b800d5457ca941795f.tar.gz
redmine-8900797adaf29adc447925b800d5457ca941795f.zip
Refactor: move method to Model.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4086 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/timelog_controller.rb')
-rw-r--r--app/controllers/timelog_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/timelog_controller.rb b/app/controllers/timelog_controller.rb
index e234848d0..726c69d5b 100644
--- a/app/controllers/timelog_controller.rb
+++ b/app/controllers/timelog_controller.rb
@@ -260,8 +260,8 @@ private
end
@from, @to = @to, @from if @from && @to && @from > @to
- @from ||= (TimeEntry.minimum(:spent_on, :include => :project, :conditions => Project.allowed_to_condition(User.current, :view_time_entries)) || Date.today) - 1
- @to ||= (TimeEntry.maximum(:spent_on, :include => :project, :conditions => Project.allowed_to_condition(User.current, :view_time_entries)) || Date.today)
+ @from ||= (TimeEntry.earilest_date_for_project || Date.today) - 1
+ @to ||= (TimeEntry.latest_date_for_project || Date.today)
end
def load_available_criterias