This project is archived and is in readonly mode.
[PATCH] map.resource should generate default route with :get not :post
-
Geoff Garside
The attached patch seems to fix this from visual inspection but I still can't replicate the issue in tests.
The patch just changes the order in which the routes for a map.resource are added to the route set, this has the effect that :show gets the dashboard named route and not :create.
-
Geoff Garside
Forgot to pull before making the patch
-
Geoff Garside
- Tag changed from actioncontroller, actionpack, edge, resource, routes, routing to actioncontroller, actionpack, edge, patch, resource, routes, routing
- Title changed from map.resource generating default named route to :create to [PATCH] map.resource should generate default route with :get not :post
Added a test case, aside from that the patch remains the same. The test is as below
# actionpack/test/controller/resources_test.rb def test_default_singleton_restful_route_uses_get with_routing do |set| set.draw do |map| map.resource :product end assert_equal :get, set.named_routes.routes[:product].conditions[:method] end end -
Michael Koziarski
- State changed from new to resolved
