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

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Website Login Issue developed in magento -

Can the constants be defined inside a model file of a framework in PHP? -