authentication - Rails: Roles/admin -
prefface i'm new rails & programming. working on first rails app--i have authentication omniauth , devise , simple article submission working users.
i want 2 things:
if user isn't specific role, reroute them page.
if preference 'offline' allow admins view site.
i have yet create prefferences table--looking suggestions. :)
what's best way set simple roles? what's easiest way redirect users if they're not admin and if site 'offline'?
i'm using cancan role-based authorization on current project. i've found works great including ability both of you're looking for. , documentation! oh, documentation. if gem authors wrote documentation cancan's, believe bring world peace.
and added bonus, because written ryan bates, has railscast recorded it.
Comments
Post a Comment