Skip to content

Commit

Permalink
Added notes to Routing documentation and routes.rb regarding defaults…
Browse files Browse the repository at this point in the history
… routes opening the whole application for GET requests

Signed-off-by: Michael Koziarski <michael@koziarski.com>
  • Loading branch information
Clemens Kofler authored and NZKoz committed Jul 10, 2008
1 parent c6a4c17 commit 6e58a25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions actionpack/lib/action_controller/routing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down
2 changes: 2 additions & 0 deletions railties/configs/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
# 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

0 comments on commit 6e58a25

Please sign in to comment.