<% @history.each do |t| %> <% abstract_model = RailsAdmin.config(t.table).abstract_model %> <% if o = abstract_model.try(:get, t.item) %> <% label = o.send(abstract_model.config.object_label_method) %> <% if show_action = action(:show, abstract_model, o) %> <% else %> <% end %> <% else %> <% label = Object.const_defined?(t.table) ? t.table.constantize.model_name.human : t.table %> <% end %> <% end %>
<%= t("admin.table_headers.username") %> <%= t("admin.table_headers.item") %> <%= t("admin.table_headers.changes") %>
<%= t.try :username %> <%= link_to(label, url_for(action: show_action.action_name, model_name: abstract_model.to_param, id: o.id)) %> <%= label %> <%= "#{label} ##{t.item}" %> <%= t.message %>