How to build App with Roles Admin,User..

I'm trying create Demo Web with Roles Adim,User
I want my Demo have function same as: if user login with Username and
Password of Admin then you can have roles Delete,Edit..and if login as
Username and Password of user is none
I tried with Mysql and someone giveme some advise.Thanks

I suggest you to look at, following gems:
Devise -> Authentication

CanCan -> Authorization

rolify -> To manage roles

Hope this would help you.

First, if you have not already done so, work right through a good
rails tutorial such as, which is free to use online.


take a look at rails_composer. it's a great gem which will build a
basic site for you with all the features you're looking for. The
problem is, without a working knowledge of rails you won't know much
about what to do with the results to make a site that does more than
the basic authentication pieces you're looking at...

good luck,


You can use cancan for Cancan for role based authorization.


Sai Kiran Mothe

**Founder. **

Agile Web Development on Rails book has very good chapter about this