Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix for Issue #1306 - More insightful PaperTrail info #1329

Merged
merged 5 commits into from

2 participants

@jorgeramos

Makes use of PaperTrail's Version's change set to provide more insight into what changed from one version to the next.

@jorgeramos jorgeramos Fix for Issue #1306
Makes use of PaperTrail's Version's change set to provide more insight into what changed from one version to the next.
7275ebd
@bbenezech
Collaborator

Can you spec it a bit? Doesn't it break the base history plug-in? Does its auditing-adapter have a #change ?

jorgeramos added some commits
@jorgeramos jorgeramos Fix for Issue #1306
Makes use of PaperTrail's Version's change set to provide more insight into what changed from one version to the next.
73934ab
@jorgeramos jorgeramos Merge branch 'master' of git://github.com/sferik/rails_admin into pap…
…er-trail-changeset
a893cb5
@jorgeramos jorgeramos Merge branch 'master' of https://github.com/jorgeramos/rails_admin in…
…to paper-trail-changeset

Conflicts:
	lib/rails_admin/extensions/paper_trail/auditing_adapter.rb
734b9ca
@jorgeramos

Hi, I edited the fix so it doesn't break the base history plug-in and it no longer has a #change method.

@jorgeramos

Hello Benoit, let me know if there are any other changes I need to make so this can be added into the master branch.

@bbenezech
Collaborator

Hi, If you look at the diff, https://github.com/sferik/rails_admin/pull/1329/files, you can see you are still calling object#changes. Is it intentional?

Spec coverage is spotty in this area.

@jorgeramos

Benoit, there should only now be a single file with changes. See updated changelog...

@bbenezech bbenezech merged commit a927d6c into from
@bbenezech
Collaborator

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 24, 2012
  1. @jorgeramos

    Fix for Issue #1306

    jorgeramos authored
    Makes use of PaperTrail's Version's change set to provide more insight into what changed from one version to the next.
Commits on Sep 30, 2012
  1. @jorgeramos

    Fix for Issue #1306

    jorgeramos authored
    Makes use of PaperTrail's Version's change set to provide more insight into what changed from one version to the next.
  2. @jorgeramos
  3. @jorgeramos

    Merge branch 'master' of https://github.com/jorgeramos/rails_admin in…

    jorgeramos authored
    …to paper-trail-changeset
    
    Conflicts:
    	lib/rails_admin/extensions/paper_trail/auditing_adapter.rb
Commits on Oct 12, 2012
  1. @jorgeramos
This page is out of date. Refresh to see the latest.
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
Something went wrong with that request. Please try again.