mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix documentation for with_routing to reflect new reality (closes #5281)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4433 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
100b994d90
commit
7d88146e9e
2 changed files with 11 additions and 7 deletions
|
@ -1,5 +1,7 @@
|
|||
*SVN*
|
||||
|
||||
* Fix documentation for with_routing to reflect new reality. #5281 [rramdas@gmail.com]
|
||||
|
||||
* Rewind readable CGI params so others may reread them (such as CGI::Session when passing the session id in a multipart form). #210 [mklame@atxeu.com, matthew@walker.wattle.id.au]
|
||||
|
||||
* Added Mime::TEXT (text/plain) and Mime::ICS (text/calendar) as new default types [DHH]
|
||||
|
|
|
@ -453,13 +453,15 @@ module ActionController #:nodoc:
|
|||
# The new instance is yielded to the passed block. Typically the block
|
||||
# will create some routes using map.draw { map.connect ... }:
|
||||
#
|
||||
# with_routing do |set|
|
||||
# set.draw { set.connect ':controller/:id/:action' }
|
||||
# assert_equal(
|
||||
# ['/content/10/show', {}],
|
||||
# set.generate(:controller => 'content', :id => 10, :action => 'show')
|
||||
# )
|
||||
# end
|
||||
# with_routing do |set|
|
||||
# set.draw do |map|
|
||||
# map.connect ':controller/:action/:id'
|
||||
# assert_equal(
|
||||
# ['/content/10/show', {}],
|
||||
# map.generate(:controller => 'content', :id => 10, :action => 'show')
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
#
|
||||
def with_routing
|
||||
real_routes = ActionController::Routing::Routes
|
||||
|
|
Loading…
Reference in a new issue