diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-24 18:55:09 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-24 18:55:09 +0000 |
commit | d04b4aafb642f4570679785f7e36cf68e85aab9b (patch) | |
tree | ecb484174c6dfd8543ce968910f7da316100519e /app/models/version.rb | |
parent | cc19635b6e8e739e96cda4ae784dcf0681e0a968 (diff) | |
download | redmine-d04b4aafb642f4570679785f7e36cf68e85aab9b.tar.gz redmine-d04b4aafb642f4570679785f7e36cf68e85aab9b.zip |
Use :joins instead of :include.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8982 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/version.rb')
-rw-r--r-- | app/models/version.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/version.rb b/app/models/version.rb index 08463976b..012168a8c 100644 --- a/app/models/version.rb +++ b/app/models/version.rb @@ -68,7 +68,7 @@ class Version < ActiveRecord::Base # Returns the total reported time for this version def spent_hours - @spent_hours ||= TimeEntry.sum(:hours, :include => :issue, :conditions => ["#{Issue.table_name}.fixed_version_id = ?", id]).to_f + @spent_hours ||= TimeEntry.sum(:hours, :joins => :issue, :conditions => ["#{Issue.table_name}.fixed_version_id = ?", id]).to_f end def closed? |