hi,
I am using rails 3.0.10, i had created user and admin using devise,
i want to make normal user as admin, can anyone help me on how to make
user as admin
Thanks
Kapil
hi,
I am using rails 3.0.10, i had created user and admin using devise,
i want to make normal user as admin, can anyone help me on how to make
user as admin
Thanks
Kapil
The easiest way is probably to just have a boolean “is_admin” field on
the
user model.
Really depends on your other requirements though.
On Jan 9, 2012, at 5:09 AM, Kapil K. wrote:
hi,
I am using rails 3.0.10, i had created user and admin using devise,
i want to make normal user as admin, can anyone help me on how to make
user as admin
Have you created two different models, one for admin and one for user?
Or are you using an authorization scheme where you give individual users
(all the same model) different roles?
Walter
It’s there on the wiki
Ahmy Y.
ya, I used the same link for for creating admin role, but now i want
to make user to act as another admin
I am using different models for user and admin
I followed to create admin and users roles in the following links
I used different models for admin and user
But now i want to make the some users to act as admin, please tell me
the process of making a user as admin
The great way to use Devise , for me, it’s t couple it with the Gem
CANCAN
to manage capabilities. Then
you just have to make a migration to add different ‘role’ to the
user(with
devise) like ‘ADMIN’, ‘COMMON’,or ‘VISITOR’.
Checkout the Readme.md of the gem Cancan on these suitable links:
video tuts of Ryanb Baytes :
The gem on Github: GitHub - ryanb/cancan: Authorization Gem for Ruby on Rails.
I hope this will help you.
Good luck
2012/1/11 Kapil K. [email protected]
[email protected].
http://groups.google.com/group/rubyonrails-talk?hl=en.
–
lionel Bastian LONKAP TSAMBA
tudiant 4e anne Gnie Informatique et Statistiques Polytech-lille
Site: http://first-developer.fr
Email: [email protected]
Tel: +336 12 48 03 01
–
lionel Bastian LONKAP TSAMBA
Fourth year student in Software Engineering and Statistics
at the Lille University Graduate School of Engineers (Polytech-Lille)
Site: http://first-developer.fr
Email: [email protected]
Phone: +336 12 48 03 01
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs