Right now I'm currently using easy_table like this:
<%= table_for(collection, class: 'table') do |t| %>
<% [:name, :email, :other_field].each do |field| %>
<% t.column field, MyModel.human_attribute_name(field) %>
<% end %>
<% end %>
Which feels a little messy.
Would it be ok if I opened a PR that used the human_attribute_name method (if it is defined on a class) as a fallback for if an I18n isn't defined under the en.easy_table.* namespace?
For example, to find the column name for the name field, it would lookup the i18n keys in this order:
Right now I'm currently using easy_table like this:
Which feels a little messy.
Would it be ok if I opened a PR that used the human_attribute_name method (if it is defined on a class) as a fallback for if an I18n isn't defined under the
en.easy_table.*
namespace?For example, to find the column name for the
name
field, it would lookup the i18n keys in this order:What do you think?