mirror of
https://github.com/github/rails.git
synced 2026-02-08 13:15:23 -05:00
Added notes to Routing documentation and routes.rb regarding defaults routes opening the whole application for GET requests
Signed-off-by: Michael Koziarski <michael@koziarski.com>
This commit is contained in:
committed by
Michael Koziarski
parent
d37e641336
commit
feb08984ea
@@ -88,6 +88,10 @@ module ActionController
|
||||
#
|
||||
# map.connect ':controller/:action/:id', :action => 'show', :defaults => { :page => 'Dashboard' }
|
||||
#
|
||||
# Note: The default routes, as provided by the Rails generator, make all actions in every
|
||||
# controller accessible via GET requests. You should consider removing them or commenting
|
||||
# them out if you're using named routes and resources.
|
||||
#
|
||||
# == Named routes
|
||||
#
|
||||
# Routes can be named with the syntax <tt>map.name_of_route options</tt>,
|
||||
|
||||
@@ -36,6 +36,8 @@ ActionController::Routing::Routes.draw do |map|
|
||||
# See how all your routes lay out with "rake routes"
|
||||
|
||||
# Install the default routes as the lowest priority.
|
||||
# Note: These default routes make all actions in every controller accessible via GET requests. You should
|
||||
# consider removing the them or commenting them out if you're using named routes and resources.
|
||||
map.connect ':controller/:action/:id'
|
||||
map.connect ':controller/:action/:id.:format'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user