Gibson
Gibson

Reputation: 2085

Rolify undefined method error

I'm having trouble to install Rolify. I just want to have a Role "Admin", on which when users have it, are able to delete photos.

I have followed the installation process, and everything looks fine, except when I try to add a role to a specific user, I get the following error:

NoMethodError: undefined method `find_or_create_by' for #<Rolify::Adapter::ResourceAdapter:0x00000109403710>

User model

  rolify :role_cname => 'Admin'

  resourcify

Any ideas?

Thanks

Upvotes: 1

Views: 545

Answers (1)

Shyam
Shyam

Reputation: 663

Delete the 'resourcify' line from your model, as you cant use both rolify and resourcify together.

Upvotes: 1

Related Questions