Changeset 8387
- Timestamp:
- 12/14/07 18:12:08 (7 months ago)
- Files:
-
- trunk/actionpack/lib/action_controller/routing.rb (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/lib/action_controller/routing.rb
r8380 r8387 1049 1049 end 1050 1050 1051 class RouteSet #:nodoc: 1051 class RouteSet #:nodoc: 1052 1052 # Mapper instances are used to build routes. The object passed to the draw 1053 1053 # block in config/routes.rb is a Mapper instance. … … 1055 1055 # Mapper instances have relatively few instance methods, in order to avoid 1056 1056 # clashes with named routes. 1057 class Mapper #: nodoc:1058 def initialize(set) 1057 class Mapper #:doc: 1058 def initialize(set) #:nodoc: 1059 1059 @set = set 1060 1060 end 1061 1061 1062 1062 # Create an unnamed route with the provided +path+ and +options+. See 1063 # SomeHelpfulUrlfor an introduction to routes.1063 # ActionController::Routing for an introduction to routes. 1064 1064 def connect(path, options = {}) 1065 1065 @set.add_route(path, options) … … 1071 1071 end 1072 1072 1073 def named_route(name, path, options = {}) 1073 def named_route(name, path, options = {}) #:nodoc: 1074 1074 @set.add_named_route(name, path, options) 1075 1075 end … … 1083 1083 # end 1084 1084 # 1085 # This will create admin_products_urlpointing to "admin/products", which will look for an Admin::ProductsController.1086 # It'll also create admin_product_tags_urlpointing to "admin/products/#{product_id}/tags", which will look for1085 # This will create +admin_products_url+ pointing to "admin/products", which will look for an Admin::ProductsController. 1086 # It'll also create +admin_product_tags_url+ pointing to "admin/products/#{product_id}/tags", which will look for 1087 1087 # Admin::TagsController. 1088 1088 def namespace(name, options = {}, &block) … … 1094 1094 end 1095 1095 1096 1097 def method_missing(route_name, *args, &proc) 1096 def method_missing(route_name, *args, &proc) #:nodoc: 1098 1097 super unless args.length >= 1 && proc.nil? 1099 1098 @set.add_named_route(route_name, *args)