RailsCasts Pro episodes are now free!

Learn more or hide this

Tudor Lupei's Profile

GitHub User: tudorlupei

Comments by Tudor Lupei

Avatar

Thanks a bunch for this one. I'd recommend dropping `resources :sessions` in favour of:

  get 'log_in' => 'sessions#new'
  post 'log_in' => 'sessions#create'
  get 'log_out' => 'sessions#destroy'
  
This way, if the log in fails, the location doesn't change to `\sessions`.