Ruby on rails admin actions -
i'm learning rails 4 , i'm looking build in basic admin functionality such creating , viewing users. can think of few ways manually, (such creating new controller or adding filters) i'm pretty sure there's "rails way" easily. i've been digging through docs , see references "built in authentication" support hunch, can't find actual documentation.
for example, in cakephp can prefix actions admin_
, /admin/controller/action
work automatically. there similar convention rails? if so, can find it?
update: continue research this, start impression admin authorization in rails commonly not handled rails core, rather in gem cancan. perhaps why striking out searching rails docs.
update2: question wasn't intended round-up of authorization gems, since appears gems typical way handle basic admin authorization, i'd find simplest, basic (and universal) option. couple options have been proposed below come bundled default dashboard views , elaborate configurations. don't need that. simple, reliable strategy dividing users admins , non-admins different scopes of allowed actions.
check out awesome rails_admin gem. automatically generates need. handy , awesome project. https://github.com/sferik/rails_admin
authentication handled via devise gem , authorization via cancan.
it's no replacement custom admin functionality if have specific requirements, it's great general admin tasks described.
Comments
Post a Comment