diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-02-07 09:10:57 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-02-07 09:10:57 +0000 |
commit | 4bbd3d81fd5f8860703aa9a29bb6166a334cc6cc (patch) | |
tree | 89789e7a917ede6c0c39e7d7ce407435a13a8beb /app | |
parent | f7cfaf06ad625485ed4ee5b2be4248f5a3cf239e (diff) | |
download | redmine-4bbd3d81fd5f8860703aa9a29bb6166a334cc6cc.tar.gz redmine-4bbd3d81fd5f8860703aa9a29bb6166a334cc6cc.zip |
TimeEntry acts_as_activity_provider scope should joins(:project) (#18818).
Patch by Ondřej Ezr.
git-svn-id: http://svn.redmine.org/redmine/trunk@13971 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/time_entry.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/time_entry.rb b/app/models/time_entry.rb index 2445a3357..f66fbc78a 100644 --- a/app/models/time_entry.rb +++ b/app/models/time_entry.rb @@ -35,7 +35,7 @@ class TimeEntry < ActiveRecord::Base acts_as_activity_provider :timestamp => "#{table_name}.created_on", :author_key => :user_id, - :scope => preload(:project) + :scope => joins(:project).preload(:project) validates_presence_of :user_id, :activity_id, :project_id, :hours, :spent_on validates_numericality_of :hours, :allow_nil => true, :message => :invalid |