Skip to content

Commit

Permalink
Add default error code to render calls
Browse files Browse the repository at this point in the history
Rails 7 adds error codes to validation errors, updated to match rails defaults
rails/rails@e83d7dc
  • Loading branch information
alex-benoit authored Oct 31, 2022
1 parent 7604c4b commit 22ac296
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ class SessionsController < ApplicationController
redirect_to user
else
flash.now[:message] = "Please try again."
render :new
render :new, status: :unprocessable_entity
end
end

Expand All @@ -277,7 +277,7 @@ class SessionsController < ApplicationController
redirect_to result.user
else
flash.now[:message] = t(result.message)
render :new
render :new, status: :unprocessable_entity
end
end

Expand Down

0 comments on commit 22ac296

Please sign in to comment.