I have user_role table like this:
user_role_id (pk)
name (e.g admin)
access_one
access_two
acccess_three
and user_table with columns like:
user_id (pk)
user_role_id (fk)
username
password
I have view to create above users_roles through admin panel.
Then how can I use the named roles ? so that I can get benefit of Role Inheritance in cancan & also I wish that list of rolenames should remain sync with database.
Further,
I wish to set access in ability.rb
based on the access_one,access_two,etc. defined in user_role table.so,how can I accomplish this?