Skip to content

Commit

Permalink
Merge pull request #1843 from ideadapt/dashboard-history-view-correct…
Browse files Browse the repository at this point in the history
…ions

Upgrade dashboard history view
  • Loading branch information
mshibuya committed Jan 20, 2014
2 parents 9bb02d0 + bb0797d commit 2010c96
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/views/rails_admin/main/_dashboard_history.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
%thead
%tr
%th.shrink.user= t("admin.table_headers.username")
%th.shrink.items= t("admin.table_headers.items")
%th.shrink.items= t("admin.table_headers.item")
%th.changes= t("admin.table_headers.changes")
%tbody
- @history.each do |t|
- abstract_model = RailsAdmin.config(t.table).try(:abstract_model)
- abstract_model = RailsAdmin.config(t.table).abstract_model
%tr
%td= t.try :username
- if o = abstract_model.try(:get, t.item)
Expand All @@ -16,5 +16,6 @@
- else
%td= label
- else
%td= "#{t.table} ##{t.item}"
%td= t.message.in?(['delete', 'new']) ? t("admin.actions.#{t.message}.done").capitalize : t.message
- label = Object.const_defined?(t.table) ? t.table.constantize.model_name.human : t.table
%td= "#{label} ##{t.item}"
%td= t.message

0 comments on commit 2010c96

Please sign in to comment.