FSFTN / Pension-Tracker

Rails application for Postal department
GNU Lesser General Public License v3.0
2 stars 0 forks source link

authentication in application controller #7

Closed aravindgd closed 9 years ago

aravindgd commented 9 years ago

If you have

 before_filter :authenticate_user!

in the application_controller then all the pages can be only viewed with logging in, is this the desired result?

prashantbarca commented 9 years ago

I think we need to add except here.

On Thu, 12 Feb 2015 8:57 AM Aravind Gopalakrishnan notifications@github.com wrote:

If you have

before_filter :authenticate_user!

in the application_controller then all the pages can be only viewed with logging in, is this the desired result?

— Reply to this email directly or view it on GitHub https://github.com/FSFTN/Pension-Tracker/issues/7.

aravindgd commented 9 years ago

Except won't help much and make things complex. Add the before_filter to controllers where you need authentication alone not everywhere else and also change before_filter to before_action as the former is about to be deprecated.

prashantbarca commented 9 years ago

Okay... I just read the application_controller part! I thought this was in some controller only! My bad! Yes... Horrible idea to put it in application_controller.

On Thu, 12 Feb 2015 12:36 PM Aravind Gopalakrishnan < notifications@github.com> wrote:

Except won't help much and make things complex. Add the before_filter to controllers where you need authentication alone not everywhere else and also change before_filter to before_action as the former is about to be deprecated.

— Reply to this email directly or view it on GitHub https://github.com/FSFTN/Pension-Tracker/issues/7#issuecomment-74026948.