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:
Clemens Kofler
2008-07-09 21:41:03 +02:00
committed by Michael Koziarski
parent d37e641336
commit feb08984ea
2 changed files with 6 additions and 0 deletions

View File

@@ -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>,

View File

@@ -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