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

Paper_trail and Rails_admin on rails 5 #2691

Closed
Adeering opened this issue Aug 17, 2016 · 4 comments
Closed

Paper_trail and Rails_admin on rails 5 #2691

Adeering opened this issue Aug 17, 2016 · 4 comments

Comments

@Adeering
Copy link

When I try to add history to my admin I get the following error:
undefined method 'version_class_name' for #<Class:0x0056249a09f190>

I have the two gems install (remotipart and rails_admin >= 1.0.0.rc) and in my rails_admin.rb file I put in this:

RailsAdmin.config do |config|

  ### Popular gems integration

  ## == Devise ==
  config.authenticate_with do
    warden.authenticate! scope: :user
  end
  config.current_user_method(&:current_user)

  ## == Cancan ==
  # config.authorize_with :cancan

  ## == Pundit ==
  # config.authorize_with :pundit

  ## == PaperTrail ==
  config.audit_with :paper_trail, 'User', 'PaperTrail::Version' # PaperTrail >= 3.0.0

  ### More at https://github.com/sferik/rails_admin/wiki/Base-configuration

  ## == Gravatar integration ==
  ## To disable Gravatar integration in Navigation Bar set to false
  # config.show_gravatar true

  config.actions do
    dashboard                     # mandatory
    index                         # mandatory
    new
    export
    bulk_delete
    show
    edit
    delete
    show_in_app

    ## With an audit adapter, you can add:
    history_index
    history_show
  end
end

Ive tested the paper_trail versions in the console and everything works fine. I have added the object_changes column per the instructions also.

@dgobaud
Copy link

dgobaud commented Jan 11, 2017

having this problem too :( anyone?

@lazebny
Copy link
Contributor

lazebny commented Apr 3, 2017

I had the same issue, my conditions:

before:

class User; end
class General::User < ::User; has_paper_trail end

after:

class User; has_paper_trail end
class General::User < ::User; end

It was resolved after adding has_paper_trail to User model.

@chabgood
Copy link

If this is not an problem anymore, please close this issue.

@mshibuya
Copy link
Member

mshibuya commented May 6, 2019

Closed by #2865.

@mshibuya mshibuya closed this as completed May 6, 2019
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

5 participants