diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-09-30 11:42:48 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2019-09-30 11:42:48 +0000 |
commit | 0779cd6e534eb04345996fd6a5a45e960f286931 (patch) | |
tree | ebaeb3f6a6922429adad49fed5adf2442799c742 /app/models/issue.rb | |
parent | 91d7916f389664029adca1e42851e7b008ec7d40 (diff) | |
download | redmine-0779cd6e534eb04345996fd6a5a45e960f286931.tar.gz redmine-0779cd6e534eb04345996fd6a5a45e960f286931.zip |
code cleanup: rubocop: fix Layout/ElseAlignment in Issue class total_spent_hours method
git-svn-id: http://svn.redmine.org/redmine/trunk@18567 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r-- | app/models/issue.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index 7da5c9fc7..81a569710 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -1069,11 +1069,12 @@ class Issue < ActiveRecord::Base # Returns the total number of hours spent on this issue and its descendants def total_spent_hours - @total_spent_hours ||= if leaf? - spent_hours - else - self_and_descendants.joins(:time_entries).sum("#{TimeEntry.table_name}.hours").to_f || 0.0 - end + @total_spent_hours ||= + if leaf? + spent_hours + else + self_and_descendants.joins(:time_entries).sum("#{TimeEntry.table_name}.hours").to_f || 0.0 + end end def total_estimated_hours |