Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

current activeadmin gem not working with cancan #10

Open
ghost opened this issue Mar 30, 2013 · 4 comments
Open

current activeadmin gem not working with cancan #10

ghost opened this issue Mar 30, 2013 · 4 comments

Comments

@ghost
Copy link

ghost commented Mar 30, 2013

if i install the activeadmin gem from the current github repo, then i get that errormessage

NoMethodError - protected method `authorize!' called for #Admin::UsersController:0xa4f301c:

if i go back to official 0.5.1 - working

dont know why.

@fedorn
Copy link

fedorn commented Apr 3, 2013

I also discovered this. But I think it is activeadmin bug.

@marcusgadbem
Copy link

Yes, I got that error too. Is it really a bug?

I followed the 2 steps described in documentation (http://activeadmin.info/docs/13-authorization-adapter.html#using_the_cancan_adapter) to integrate with CanCan and I get this error:

    ArgumentError in Admin::DashboardController#index
    wrong number of arguments(1 for 0)

My Gemfile is just:

    gem 'rails', '3.2.8'
    gem 'activeadmin'
    gem 'cancan'

Trying the other way around (with AuthorizationAdapter), I get the following error using almost the same code as described in documentation (http://activeadmin.info/docs/13-authorization-adapter.html#setting_up_your_own_authorizationadapter):

    undefined method `normalize' for #<AuthorizationAbility:0x00000101d69668>

I have no technique preference, anyone could fit me.
Any thoughts?


Nevermind, guys. Got it working with CanCan and don't know why.

@cassioscabral
Copy link

When I change my gemfile to

gem 'activeadmin', :git => 'https://github.com/gregbell/active_admin.git'
gem 'cancan'

and removed the code from apllication_controller suggested by active-admin wiki, it worked fine.

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

No branches or pull requests

4 participants