ruby on rails - Restrict access to the whole website -


i new on rails , have website users can post article website accessible people logged in , have several questions.

first, how can create page without application layout because want form in "log in" page ?

how can restrict access users didn't logged in , redirect them log in page ?

edit : first question, here answer

i recommend path:

  1. build authentication scratch understand how works. there tutorial here http://railscasts.com/episodes/250-authentication-from-scratch-revised

  2. when understand principles of authentication, can use devise gem or sorcery gem.

  3. managing level of restrictions different users can accomplished cancancan gem.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

spring cloud - How to configure SpringCloud Eureka instance to point to https on non standard port -

javascript - Bootstrap Popover: iOS Safari strange behaviour -