Commit c1f508b0 authored by Dan Rowden's avatar Dan Rowden Committed by Alfredo Sumaran

Use newer hash style

parent 909deaa3
...@@ -41,9 +41,9 @@ module MilestonesHelper ...@@ -41,9 +41,9 @@ module MilestonesHelper
def milestone_counts(project:) def milestone_counts(project:)
counts = @project.milestones.reorder(nil).group(:state).count() counts = @project.milestones.reorder(nil).group(:state).count()
{ {
'opened' => counts['active'], opened: counts['active'],
'closed' => counts['closed'], closed: counts['closed'],
'all' => counts['active'] + counts['closed'] all: counts['active'] + counts['closed']
} }
end end
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
%li{class: ("active" if params[:state].blank? || params[:state] == 'opened')} %li{class: ("active" if params[:state].blank? || params[:state] == 'opened')}
= link_to milestones_filter_path(state: 'opened') do = link_to milestones_filter_path(state: 'opened') do
Open Open
%span.badge #{counts['opened']} %span.badge #{counts[:opened]}
%li{class: ("active" if params[:state] == 'closed')} %li{class: ("active" if params[:state] == 'closed')}
= link_to milestones_filter_path(state: 'closed') do = link_to milestones_filter_path(state: 'closed') do
Closed Closed
%span.badge #{counts['closed']} %span.badge #{counts[:closed]}
%li{class: ("active" if params[:state] == 'all')} %li{class: ("active" if params[:state] == 'all')}
= link_to milestones_filter_path(state: 'all') do = link_to milestones_filter_path(state: 'all') do
All All
%span.badge #{counts['all']} %span.badge #{counts[:all]}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment