Skip to content

Commit

Permalink
Humanize only the type parameter
Browse files Browse the repository at this point in the history
The project parameter does not need to be humanized.

When no type or filter project are selected, show 'Unread' instead of
'Inbox', to be consistent with the names of the filters.
  • Loading branch information
eduardoj committed Jul 8, 2020
1 parent 5fad21c commit fd1eeda
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
.card.mb-3
%strong.d-block.d-md-none.p-3{ data: { toggle: 'collapse', target: '#filters' },
aria: { expanded: true, controls: 'filters' } }
Filtered by: #{(params[:type] || params[:project] || 'Inbox').humanize}
Filtered by: #{params[:type]&.humanize || params[:project] || 'Unread'}
%i.float-right.mt-1.fa.fa-chevron-down
.card-body.collapse#filters
= render partial: 'notifications_filter', locals: { projects_for_filter: @projects_for_filter, notifications_count: @notifications_count }
Expand Down

0 comments on commit fd1eeda

Please sign in to comment.