diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/sessions_controller.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 25af8a1..9e539ac 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -13,12 +13,12 @@ class SessionsController < ApplicationController respond_to do |format| if @user && @user.authenticate(params[:session][:password]) sign_in @user - format.html { redirect_to root_path } + format.html { redirect_to root_path } else - format.html { render action: 'new' } - format.json { render json: @user.errors, status: :unprocessable_entity } - end - end + format.html { render action: 'new' } + format.json { render json: @user.errors, status: :unprocessable_entity } + end + end end # DELETE /sessions/current |