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

Rails Admin's use of cancan(can) is incorrect and is erroring with v2 #2901

Closed
hlascelles opened this issue Jul 18, 2017 · 3 comments
Closed

Comments

@hlascelles
Copy link

When loading the main dashboard, the cancan(can) adapter tries to authorise(:dashboard, nil).

Not passing in any model (the nil) is incorrect use of cancancan, according to a maintainer.

Can we change the authorise to pass in :rails_admin as the "model"? I understand this is a breaking change. Perhaps do it if cancancan is seen to be v2 or higher?

@edslocomb
Copy link

Bump.

We're working around this for now by using a separate ability class for the rails_admin gem.

@farmisen
Copy link

farmisen commented Aug 9, 2017

I don't understand how using a separate ability class would solve this problem. This new adapter class does tho: CanCanCommunity/cancancan#413 (comment)

@tkfarr
Copy link

tkfarr commented Feb 6, 2018

I'm trying to figure out how to install this new adapter/extension for cancancan. Where do I place it in the project?

mshibuya added a commit that referenced this issue Jun 30, 2018
mshibuya added a commit that referenced this issue Jun 30, 2018
mshibuya added a commit that referenced this issue Jun 30, 2018
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

4 participants