Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problems with work of papertrail gem for rails 4.2 #2144

Closed
kpblc opened this issue Dec 29, 2014 · 2 comments
Closed

problems with work of papertrail gem for rails 4.2 #2144

kpblc opened this issue Dec 29, 2014 · 2 comments

Comments

@kpblc
Copy link

kpblc commented Dec 29, 2014

hello!
papertrail list, shows something like #User:0x00000004a9df90 instead example_user@mail.com
problem appears after updating rails to 4.2. (rails 4.1.8 all works correctly)

P.S. i'll allready create an issue in papertrail repo paper-trail-gem/paper_trail#452

P.P.S. in screenshot

User:0x00000004a9df90 instead admin@mail.com it's for version rails 4.2.

correct email showed, then i'll rollback rails to 4.1.8

89d85aca-8e13-11e4-8d02-8c53e43857a3

@lognaturel
Copy link

It looks like there is a pull request out for a fix.

For now, I'm monkey patching it in by putting the following code in config/initializers/rails_admin_user_for_paper_trail.rb:

RailsAdmin::ApplicationController.module_eval do
  def user_for_paper_trail
    _current_user.try(:id) || _current_user
  end
end

(suggestions for a more elegant alternative welcome!)

@bbenezech
Copy link
Collaborator

fixed/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants