Skip to content

Commit

Permalink
Merge pull request #41 from iatanas0v/patch-1
Browse files Browse the repository at this point in the history
Inject live reload on 422
  • Loading branch information
igorkasyanchuk authored Dec 18, 2024
2 parents 6dcd66f + 910a3fb commit dcd3b73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rails_live_reload/middleware/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def call!(env)
request = ActionDispatch::Request.new(env)
status, headers, body = @app.call(env)

if html?(headers) && (status == 500 || (status.to_s =~ /20./ && request.get?))
if html?(headers) && (status == 500 || status == 422 || (status.to_s =~ /20./ && request.get?))
return inject_rails_live_reload(request, status, headers, body)
end

Expand Down

0 comments on commit dcd3b73

Please sign in to comment.