Open
Description
I installed rolify with custom classes by saying
rails g rolify:role AdminRole AdminUser
All well so far. The model AdminUser had
rolify :role_cname => 'AdminRole'
I wanted to resourcify my model Company. It worked well with just adding resourcify
.
But I couldn't delete companies. I got following error message:
Missing model class Role for the Company#roles association. (NameError)
... active_record/inheritance.rb:266:in `compute_type': uninitialized constant Company::Role (NameError)
I looked at the resourcify source code in rolify.rb, and solved my problem by adding parameters to resourcify
:
resourcify :admin_roles, { role_cname: 'AdminRole' }
Metadata
Metadata
Assignees
Labels
No labels