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 a927d6c5afd18bf193f6f8b5604270579110a188 @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 a927d6c

Please sign in to comment.