diff options
author | Fatih Acet <acetfatih@gmail.com> | 2016-06-08 18:19:04 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-06-08 18:19:04 +0300 |
commit | b868b814167564176bc6a08d01170e6a43c97fc4 (patch) | |
tree | f893117dc0499f87f985f30622ef01f777015f5c /app/helpers/milestones_helper.rb | |
parent | 480d74685dff61fdbcf3034224fa201d60181445 (diff) | |
download | gitlab-ce-b868b814167564176bc6a08d01170e6a43c97fc4.tar.gz |
Revert milestone_remaining_days helper.
Diffstat (limited to 'app/helpers/milestones_helper.rb')
-rw-r--r-- | app/helpers/milestones_helper.rb | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/app/helpers/milestones_helper.rb b/app/helpers/milestones_helper.rb index f6a8ae3fd63..87fc2db6901 100644 --- a/app/helpers/milestones_helper.rb +++ b/app/helpers/milestones_helper.rb @@ -54,18 +54,13 @@ module MilestonesHelper end end - def milestone_remaining_days(milestone, withContentTag = true) + def milestone_remaining_days(milestone) if milestone.expired? - withContentTag ? content_tag(:strong, 'expired') : 'expired' + content_tag(:strong, 'expired') elsif milestone.due_date - days = milestone.remaining_days - - if withContentTag - content = content_tag(:strong, days) - content << " #{'day'.pluralize(days)} remaining" - else - "#{days} #{'day'.pluralize(days)} remaining" - end + days = milestone.remaining_days + content = content_tag(:strong, days) + content << " #{'day'.pluralize(days)} remaining" end end end |