I get that there are a lot of questions on this subject but none have really answered what i'm looking for.
I'm attempting to use rolify to define my roles in cancan, i was able to make an admin role via rails console and set the default role for new users.
My question is how do i set a batch of roles to different values and assign those roles to certain users?
If you have a good tutorial that explains this process that would help as well, screencasts preferred.
thanks!
How do you create a batch of roles?
You can do this in your db/seeds.rb file, which is executed each time you run rake db:seed
Adding a role to someone is done like
You check whether a user has a certain role using
And, as Steve already said, the https://github.com/EppO/rolify documentation should get you on the move!