views:

17

answers:

2

I have problem in my application i need to use devise for my application there are different user levels i need to edit User controller in devise plug-in

+1  A: 

Are you handling all of the users in users controller?

if so...

before_filter :authenticate_user!, :only => [:change_password], :except => [:create, :show, :show_profile, :signup]

You can mimic the same for admin user or any other type of user... like

before_filter :authenticate_admin_user!, :only => [:edit, :update, :change_password], :except => [:new, :create, :show, :show_profile, :signup]

in which case you need to write the authenticate_user / authenticate_admin_user and handle your business logic in...

If your requirement is something else... plz let me know...

Sourcebits
A: 

i need to custamise more user levels

ex: teacher , student , admin