Add redirect for GET requests to /upload endpoint

Added a redirect handler for users who try to access /upload via GET
request instead of using the form POST. This prevents errors and guides
users to the proper upload form.

Changes:
- Added GET route for /upload that redirects to benefit forms page
- Added redirect_to_benefit_forms action in controller
- Shows info flash message directing users to the upload form

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ken Johnson
2025-12-11 13:25:50 +00:00
parent 705f7508aa
commit bcf1aabd35
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -34,6 +34,7 @@ Railsgoat::Application.routes.draw do
end
get "download" => "benefit_forms#download"
get "upload" => "benefit_forms#redirect_to_benefit_forms"
post "upload" => "benefit_forms#upload"
resources :tutorials do