% exceptions ||= ['id', 'created_at', 'updated_at', 'deleted_at'] %> <% excluded_columns ||= [] %> <% hide_actions ||= false %> <% sort_fields ||= [] %> <% form_fields ||= (list.first.class.respond_to?('form_fields') ? list.first.class.form_fields : {}) %> <% form_ordered_fields ||= (form_fields.empty? ? list.first.class.column_names : form_fields.keys) %>
<%= sort_link(@q, column, list.first.class.human_attribute_name(column.split("_id")[0])) %> | <% else %><%= sort_link(@q, column, list.first.class.human_attribute_name(column)) %> | <% end %> <% else %> <% if /_id$/ =~ column %><%= list.first.class.human_attribute_name(column.split("_id")[0]) %> | <% else %><%= list.first.class.human_attribute_name(column) %> | <% end %> <% end %> <% end %> <% unless hide_actions %>Ações | <% end %> <% end %>
---|---|---|---|---|
<% if object.send(column).class == Date or object.send(column).class == DateTime or object.send(column).class == ActiveSupport::TimeWithZone or object.send(column).class == Time %> <%=l object.send(column) %> <% elsif /_id$/ =~ column && object.respond_to?(column.split('_id')[0]) %> <%= object.send(column.split("_id")[0])&.name %> <% else %> <%= object.send(column) %> <% end %> | <% end %> <% unless hide_actions %><%= render 'shared/action_links', object: object %> | <% end %>