提交 519c5c75 编写于 作者: D David Heinemeier Hansson

Docfix (closes #10429) [jamesh/ssoroka]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8387 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 3486d540
......@@ -1048,19 +1048,19 @@ def build(path, options)
end
end
class RouteSet #:nodoc:
class RouteSet #:nodoc:
# Mapper instances are used to build routes. The object passed to the draw
# block in config/routes.rb is a Mapper instance.
#
# Mapper instances have relatively few instance methods, in order to avoid
# clashes with named routes.
class Mapper #:nodoc:
def initialize(set)
class Mapper #:doc:
def initialize(set) #:nodoc:
@set = set
end
# Create an unnamed route with the provided +path+ and +options+. See
# SomeHelpfulUrl for an introduction to routes.
# ActionController::Routing for an introduction to routes.
def connect(path, options = {})
@set.add_route(path, options)
end
......@@ -1070,7 +1070,7 @@ def root(options = {})
named_route("root", '', options)
end
def named_route(name, path, options = {})
def named_route(name, path, options = {}) #:nodoc:
@set.add_named_route(name, path, options)
end
......@@ -1082,8 +1082,8 @@ def named_route(name, path, options = {})
# :has_many => [ :tags, :images, :variants ]
# end
#
# This will create admin_products_url pointing to "admin/products", which will look for an Admin::ProductsController.
# It'll also create admin_product_tags_url pointing to "admin/products/#{product_id}/tags", which will look for
# This will create +admin_products_url+ pointing to "admin/products", which will look for an Admin::ProductsController.
# It'll also create +admin_product_tags_url+ pointing to "admin/products/#{product_id}/tags", which will look for
# Admin::TagsController.
def namespace(name, options = {}, &block)
if options[:namespace]
......@@ -1093,8 +1093,7 @@ def namespace(name, options = {}, &block)
end
end
def method_missing(route_name, *args, &proc)
def method_missing(route_name, *args, &proc) #:nodoc:
super unless args.length >= 1 && proc.nil?
@set.add_named_route(route_name, *args)
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册