]> git.openstreetmap.org Git - rails.git/commit
Report verification render not redirect
authorHarry Wood <github@harrywood.co.uk>
Wed, 4 May 2022 15:34:40 +0000 (16:34 +0100)
committerHarry Wood <github@harrywood.co.uk>
Wed, 4 May 2022 18:42:36 +0000 (19:42 +0100)
commitfcbccb6a441fb05ee92227dfa0cb90a2db60296c
tree17104f50b32c52aff30864ae85ff7a8c48bc44c8
parentfa77b55bd5efdb38ddfaad0911d871df5a226dd6
Report verification render not redirect

Fix an issue with the report verification, causing it to lose the text of a report if the user fails to fill in a category.

By using a `render` instead of a `redirect_to`, the rails standard verification behaviour works better. It means we also get a nice red "can't be blank" message highlighting the specific missing field.
app/controllers/reports_controller.rb
test/controllers/reports_controller_test.rb