diff options
author | Dan Rowden <hello@danrowden.com> | 2016-07-22 23:58:55 +0300 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-09-07 15:27:14 -0500 |
commit | c1f508b0b10965f9827a9e6bd564e9c0fd00f595 (patch) | |
tree | 150200a92a724a7e4f92da9f8791b41bcec68c95 /app | |
parent | 909deaa38a040777ec236d9365bc726c9de15194 (diff) | |
download | gitlab-ce-c1f508b0b10965f9827a9e6bd564e9c0fd00f595.tar.gz |
Use newer hash style
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/milestones_helper.rb | 6 | ||||
-rw-r--r-- | app/views/shared/_milestones_filter.html.haml | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/app/helpers/milestones_helper.rb b/app/helpers/milestones_helper.rb index 797cbc341e3..22d8ecd3ecb 100644 --- a/app/helpers/milestones_helper.rb +++ b/app/helpers/milestones_helper.rb @@ -41,9 +41,9 @@ module MilestonesHelper def milestone_counts(project:) counts = @project.milestones.reorder(nil).group(:state).count() { - 'opened' => counts['active'], - 'closed' => counts['closed'], - 'all' => counts['active'] + counts['closed'] + opened: counts['active'], + closed: counts['closed'], + all: counts['active'] + counts['closed'] } end diff --git a/app/views/shared/_milestones_filter.html.haml b/app/views/shared/_milestones_filter.html.haml index 20f4a22c26b..a2b17a94f80 100644 --- a/app/views/shared/_milestones_filter.html.haml +++ b/app/views/shared/_milestones_filter.html.haml @@ -4,12 +4,12 @@ %li{class: ("active" if params[:state].blank? || params[:state] == 'opened')} = link_to milestones_filter_path(state: 'opened') do Open - %span.badge #{counts['opened']} + %span.badge #{counts[:opened]} %li{class: ("active" if params[:state] == 'closed')} = link_to milestones_filter_path(state: 'closed') do Closed - %span.badge #{counts['closed']} + %span.badge #{counts[:closed]} %li{class: ("active" if params[:state] == 'all')} = link_to milestones_filter_path(state: 'all') do All - %span.badge #{counts['all']} + %span.badge #{counts[:all]} |