Skip to content

Commit

Permalink
Fix pluralization of resource table header
Browse files Browse the repository at this point in the history
Somehow Rails' `pluralize` helper does not pluralize the model name correctly. Using `model_name.human` with `count` option instead.
  • Loading branch information
tvdeyen committed Apr 16, 2019
1 parent 504abc9 commit c476c56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/views/alchemy/admin/resources/_table_header.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div class="resources-header">
<h2>
<%= pluralize resources_instance_variable.total_count, resource_model.model_name.human %>
<%= resources_instance_variable.total_count %>
<%= resource_model.model_name.human(count: resources_instance_variable.total_count) %>
</h2>
</div>

0 comments on commit c476c56

Please sign in to comment.