Skip to content

Commit

Permalink
Titleize the column not the user defined locale
Browse files Browse the repository at this point in the history
  • Loading branch information
jsntv200 authored and pablobm committed Nov 15, 2022
1 parent e0814ef commit b930ebd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/views/administrate/application/_collection.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ to display a collection of resources in an HTML table.
)) do %>
<%= t(
"helpers.label.#{collection_presenter.resource_name}.#{attr_name}",
default: resource_class.human_attribute_name(attr_name),
).titleize %>
default: resource_class.human_attribute_name(attr_name).titleize,
) %>
<% if collection_presenter.ordered_by?(attr_name) %>
<span class="cell-label__sort-indicator cell-label__sort-indicator--<%= collection_presenter.ordered_html_class(attr_name) %>">
<svg aria-hidden="true">
Expand Down
2 changes: 1 addition & 1 deletion spec/features/show_page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
end

it "displays translated labels in has_many collection partials" do
custom_label = "Time Shipped"
custom_label = "Time shipped"
customer = create(:customer)
create(:order, customer: customer)

Expand Down

0 comments on commit b930ebd

Please sign in to comment.