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
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
......
......@@ -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]}
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