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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user