Open bijrails opened 8 years ago
I was facing the same issue when using CanCanCan and Mongoid. I solve it including the Mongoid::Document module on my Ability.rb
Ps: after 4 years, I think you already solve your problem haha. But it may help someone else :D
class Ability
include Mongoid::Document
include CanCan::Ability
def initialize(store)
# my code
end
end
Hi,
I'm using mongoid (4.0.2).
rails g devise_google_authenticator:install
is throwing below error,/Users/uname/.rvm/gems/ruby-2.1.2/gems/cancancan-1.9.2/lib/cancan/model_adapters/active_record_adapter.rb:146:in `<top (required)>': uninitialized constant ActiveRecord::Base (NameError)
Any idea why install command throwing error ?
Thanks