@@ -188,7 +188,7 @@ class UsersController < ApplicationController
188188 if @user .save
189189 redirect_to root_path, notice: " Please check your email for confirmation instructions."
190190 else
191- render :new
191+ render :new , status: :unprocessable_entity
192192 end
193193 end
194194
@@ -525,11 +525,11 @@ class SessionsController < ApplicationController
525525 redirect_to root_path, notice: " Signed in."
526526 else
527527 flash.now[:alert ] = " Incorrect email or password."
528- render :new
528+ render :new , status: :unprocessable_entity
529529 end
530530 else
531531 flash.now[:alert ] = " Incorrect email or password."
532- render :new
532+ render :new , status: :unprocessable_entity
533533 end
534534 end
535535
@@ -755,11 +755,11 @@ class PasswordsController < ApplicationController
755755 redirect_to login_path, notice: " Signed in."
756756 else
757757 flash.now[:alert ] = @user .errors.full_messages.to_sentence
758- render :edit
758+ render :edit , status: :unprocessable_entity
759759 end
760760 else
761761 flash.now[:alert ] = " Incorrect email or password."
762- render :new
762+ render :new , status: :unprocessable_entity
763763 end
764764 end
765765
@@ -1334,7 +1334,7 @@ class SessionsController < ApplicationController
13341334 end
13351335 else
13361336 flash.now[:alert ] = " Incorrect email or password."
1337- render :new
1337+ render :new , status: :unprocessable_entity
13381338 end
13391339 end
13401340 ...
0 commit comments