I am using devise for my authentication system and cancan for permissions. I am in the process of adding roles and I am trying to have it so when a user signs up he will automatically be assigned a role. I watched ryan bate screencast and also followed a devise & cancan tutorial .
How I can implement this without using check boxes and automatically assign a role to user based upon when they’re signing up.
You could try using a callback: http://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html
The
before_createcallback is probably what you want in your user model: