Skip to content
EppO edited this page Apr 2, 2012 · 28 revisions

Frequently asked questions

Is it possible to manage 2 sets : Role and AdminRole ?

If you have 2 different User classes, let's say User and AdminUser, yes it is. To make it work, you need 2 Role classes (Role and AdminRole), so 2 tables in the database (so 2 migration files if you use ActiveRecord). To make it easier, just run the generator twice:

  • rails g Rolify:role
  • rails g Rolify:role AdminRole AdminUser

In User class, you just have to put rolify method in it In AdminUser class, you would add: rolify :role_cname => "AdminRole" to make it work

Clone this wiki locally