app/views/carload/dashboard/index.html.erb in carload-0.3.0 vs app/views/carload/dashboard/index.html.erb in carload-0.4.0
- old
+ new
@@ -7,16 +7,10 @@
<table class='table table-striped'>
<thead>
<tr>
<th width='20'>ID</th>
<% @show_attributes.each do |attribute| %>
- <th width='100'>
- <% begin %>
- <%= t("activerecord.attributes.#{@model_name}.#{attribute}", raise: true) %>
- <% rescue %>
- <%= t("carload.activerecord.#{attribute}") %>
- <% end %>
- </th>
+ <th width='100'><%= generate_show_title attribute rescue attribute %></th>
<% end %>
<th width='20'><%= t('carload.actions') %></th>
</tr>
</thead>
<tbody>