activeadmin / activeadmin-mongoid

ActiveAdmin hacks to support Mongoid
MIT License
192 stars 210 forks source link

undefined method `accessible_by' for ModelName:Class #75

Closed s1l3nt closed 10 years ago

s1l3nt commented 10 years ago

Hello! I have a problem on activeadmin with mongoid plugin. It's problem only on mongoid models + cancan roles. Rayanb manual (https://github.com/ryanb/cancan/wiki/Mongoid) not work in this case.

NoMethodError in Admin::ModelNameController#index
undefined method `accessible_by' for ModelName:Class
gem 'rails'
gem 'devise'
gem 'activeadmin',         github: 'gregbell/active_admin'
gem 'activeadmin-mongoid', github: 'elia/activeadmin-mongoid', branch: 'rails4'
gem 'mongo'
gem 'mongoid'

gem 'cancan'

versions:

s1l3nt commented 10 years ago

Problem resolved. Move activeadmin and activeadmin-mongoid after cancan gem in Gemfile