Permalink
Browse files

Merge pull request #1329 from jorgeramos/master

Fix for Issue #1306 - More insightful PaperTrail info
  • Loading branch information...
2 parents d45a814 + b540212 commit 34fd8a11d74be1a924a0c6fedb3c18bb931292cc @bbenezech bbenezech committed Oct 12, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/rails_admin/extensions/paper_trail/auditing_adapter.rb
View
3 lib/rails_admin/extensions/paper_trail/auditing_adapter.rb
@@ -8,7 +8,8 @@ def initialize(version, user_class = User)
end
def message
- "#{@version.event} #{@version.item_type} id #{@version.item_id}"
+ @message = "#{@version.event} #{@version.item_type} ID #{@version.item_id}"
+ @version.respond_to?(:changeset) ? @message + " [" + @version.changeset.to_a.collect {|c| c[0] + " = " + c[1][1].to_s}.join(", ") + "]" : @message
end
def created_at

0 comments on commit 34fd8a1

Please sign in to comment.