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

undefined local variable or method `rolify' for User:Class (again) #323

Open
ehwinter opened this issue Mar 17, 2015 · 0 comments
Open

undefined local variable or method `rolify' for User:Class (again) #323

ehwinter opened this issue Mar 17, 2015 · 0 comments

Comments

@ehwinter
Copy link

Using Rails 3.2, ruby 2.1, rolify 4.0.0, Mongoid 3.1.6 I'm seeing the undefined local variable issue #57 again:

I have rolify in the appropriate spot (after include Mongoid::Document) i.e.:

  include Mongoid::Document
  include ActiveModel::Validations
  include Mongoid::Timestamps
  include ActiveModel::SecurePassword
  include Mongoid::Paperclip
...
  rolify

The problem is resolved when I add extend Rolify i.e.:

  include Mongoid::Document
  include ActiveModel::Validations
  include Mongoid::Timestamps
  include ActiveModel::SecurePassword
  include Mongoid::Paperclip
...
  extend Rolify
  rolify
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

1 participant