From 8e69f1eb20a87e820244ecc880f85026b5e45d42 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Wed, 4 May 2011 21:53:10 +0200 Subject: minor correction to the ActionDispatch::Http::URL subdomain docs --- actionpack/lib/action_dispatch/http/url.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/http/url.rb b/actionpack/lib/action_dispatch/http/url.rb index d9c07d6ca3..8487b0fc8c 100644 --- a/actionpack/lib/action_dispatch/http/url.rb +++ b/actionpack/lib/action_dispatch/http/url.rb @@ -162,7 +162,7 @@ module ActionDispatch # Returns all the \subdomains as a string, so "dev.www" would be # returned for "dev.www.rubyonrails.org". You can specify a different tld_length, - # such as 2 to catch ["www"] instead of "www.rubyonrails" + # such as 2 to catch "www" instead of "www.rubyonrails" # in "www.rubyonrails.co.uk". def subdomain(tld_length = @@tld_length) subdomains(tld_length).join(".") -- cgit v1.2.3 From 9f9446f27110a0d55462edd76df55ab1a67414c6 Mon Sep 17 00:00:00 2001 From: Jacob Poulsgaard Tjoernholm Date: Fri, 6 May 2011 10:26:17 +0200 Subject: Update the description of the :path option to #resources to reflect that it sets the actual path, not a prefix. Most instances were already fixed. --- actionpack/lib/action_dispatch/routing/mapper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index a65f6e1fce..ed050b7c6a 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -555,7 +555,7 @@ module ActionDispatch # # or, for a single case # - # resources :posts, :path => "/admin" + # resources :posts, :path => "/admin/posts" # # In each of these cases, the named routes remain the same as if you did # not use scope. In the last case, the following paths map to @@ -1111,7 +1111,7 @@ module ActionDispatch # resources :posts, :module => "admin" # # # resource actions are at /admin/posts. - # resources :posts, :path => "admin" + # resources :posts, :path => "admin/posts" def resources(*resources, &block) options = resources.extract_options! -- cgit v1.2.3 From 56a7db6ea8e3a64df836b580ac9499b3de4753f0 Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Mon, 9 May 2011 22:06:04 -0300 Subject: added some fixed fonts --- actionpack/lib/action_dispatch/routing.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/routing.rb b/actionpack/lib/action_dispatch/routing.rb index 43fd93adf6..74c090f260 100644 --- a/actionpack/lib/action_dispatch/routing.rb +++ b/actionpack/lib/action_dispatch/routing.rb @@ -49,8 +49,8 @@ module ActionDispatch # You may wish to organize groups of controllers under a namespace. Most # commonly, you might group a number of administrative controllers under # an +admin+ namespace. You would place these controllers under the - # app/controllers/admin directory, and you can group them together in your - # router: + # app/controllers/admin directory, and you can group them together + # in your router: # # namespace "admin" do # resources :posts, :comments @@ -152,7 +152,7 @@ module ActionDispatch # } # end # - # Using the multiline match modifier will raise an ArgumentError. + # Using the multiline match modifier will raise an +ArgumentError+. # Encoding regular expression modifiers are silently ignored. The # match will always use the default encoding or ASCII. # -- cgit v1.2.3 From ed8962c821ac3e1ff32d692c57703b6851c92b18 Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Mon, 9 May 2011 22:21:00 -0300 Subject: more fixed-fonts here --- actionpack/lib/action_dispatch/routing/mapper.rb | 46 ++++++++++++------------ 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index ed050b7c6a..873f78ec74 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -335,7 +335,7 @@ module ActionDispatch # # [:on] # Shorthand for wrapping routes in a specific RESTful context. Valid - # values are :member, :collection, and :new. Only use within + # values are +:member+, +:collection+, and +:new+. Only use within # resource(s) block. For example: # # resource :bar do @@ -352,7 +352,7 @@ module ActionDispatch # # [:constraints] # Constrains parameters with a hash of regular expressions or an - # object that responds to #matches? + # object that responds to #matches? # # match 'path/:id', :constraints => { :id => /[A-Z]\d{5}/ } # @@ -373,7 +373,7 @@ module ActionDispatch # See Scoping#defaults for its scope equivalent. # # [:anchor] - # Boolean to anchor a #match pattern. Default is true. When set to + # Boolean to anchor a #match pattern. Default is true. When set to # false, the pattern matches any request prefixed with the given path. # # # Matches any request starting with 'path' @@ -517,15 +517,15 @@ module ActionDispatch # You may wish to organize groups of controllers under a namespace. # Most commonly, you might group a number of administrative controllers # under an +admin+ namespace. You would place these controllers under - # the app/controllers/admin directory, and you can group them together - # in your router: + # the app/controllers/admin directory, and you can group them + # together in your router: # # namespace "admin" do # resources :posts, :comments # end # # This will create a number of routes for each of the posts and comments - # controller. For Admin::PostsController, Rails will create: + # controller. For Admin::PostsController, Rails will create: # # GET /admin/posts # GET /admin/posts/new @@ -536,7 +536,7 @@ module ActionDispatch # DELETE /admin/posts/1 # # If you want to route /posts (without the prefix /admin) to - # Admin::PostsController, you could use + # Admin::PostsController, you could use # # scope :module => "admin" do # resources :posts @@ -546,7 +546,7 @@ module ActionDispatch # # resources :posts, :module => "admin" # - # If you want to route /admin/posts to PostsController + # If you want to route /admin/posts to +PostsController+ # (without the Admin:: module prefix), you could use # # scope "/admin" do @@ -559,7 +559,7 @@ module ActionDispatch # # In each of these cases, the named routes remain the same as if you did # not use scope. In the last case, the following paths map to - # PostsController: + # +PostsController+: # # GET /admin/posts # GET /admin/posts/new @@ -587,7 +587,7 @@ module ActionDispatch # # === Examples # - # # route /posts (without the prefix /admin) to Admin::PostsController + # # route /posts (without the prefix /admin) to Admin::PostsController # scope :module => "admin" do # resources :posts # end @@ -597,7 +597,7 @@ module ActionDispatch # resources :posts # end # - # # prefix the routing helper name: sekret_posts_path instead of posts_path + # # prefix the routing helper name: +sekret_posts_path+ instead of +posts_path+ # scope :as => "sekret" do # resources :posts # end @@ -679,12 +679,12 @@ module ActionDispatch # resources :posts # end # - # # maps to Sekret::PostsController rather than Admin::PostsController + # # maps to Sekret::PostsController rather than Admin::PostsController # namespace :admin, :module => "sekret" do # resources :posts # end # - # # generates sekret_posts_path rather than admin_posts_path + # # generates +sekret_posts_path+ rather than +admin_posts_path+ # namespace :admin, :as => "sekret" do # resources :posts # end @@ -846,20 +846,20 @@ module ActionDispatch # You may wish to organize groups of controllers under a namespace. Most # commonly, you might group a number of administrative controllers under # an +admin+ namespace. You would place these controllers under the - # app/controllers/admin directory, and you can group them together in your - # router: + # app/controllers/admin directory, and you can group them together + # in your router: # # namespace "admin" do # resources :posts, :comments # end # - # By default the :id parameter doesn't accept dots. If you need to - # use dots as part of the :id parameter add a constraint which + # By default the +:id+ parameter doesn't accept dots. If you need to + # use dots as part of the +:id+ parameter add a constraint which # overrides this restriction, e.g: # # resources :articles, :id => /[^\/]+/ # - # This allows any character other than a slash as part of your :id. + # This allows any character other than a slash as part of your +:id+. # module Resources # CANONICAL_ACTIONS holds all actions that does not need a prefix or @@ -975,7 +975,7 @@ module ActionDispatch # resource :geocoder # # creates six different routes in your application, all mapping to - # the GeoCoders controller (note that the controller is named after + # the +GeoCoders+ controller (note that the controller is named after # the plural): # # GET /geocoder/new @@ -1024,7 +1024,7 @@ module ActionDispatch # resources :photos # # creates seven different routes in your application, all mapping to - # the Photos controller: + # the +Photos+ controller: # # GET /photos/new # POST /photos @@ -1107,7 +1107,7 @@ module ActionDispatch # # === Examples # - # # routes call Admin::PostsController + # # routes call Admin::PostsController # resources :posts, :module => "admin" # # # resource actions are at /admin/posts. @@ -1151,7 +1151,7 @@ module ActionDispatch # end # # This will enable Rails to recognize paths such as /photos/search - # with GET, and route to the search action of PhotosController. It will also + # with GET, and route to the search action of +PhotosController+. It will also # create the search_photos_url and search_photos_path # route helpers. def collection @@ -1175,7 +1175,7 @@ module ActionDispatch # end # # This will recognize /photos/1/preview with GET, and route to the - # preview action of PhotosController. It will also create the + # preview action of +PhotosController+. It will also create the # preview_photo_url and preview_photo_path helpers. def member unless resource_scope? -- cgit v1.2.3 From bb1af05247e499e4080ccd1ab0d3a0615f7601b7 Mon Sep 17 00:00:00 2001 From: James Miller Date: Mon, 9 May 2011 18:46:07 -0700 Subject: Missing an end in routing docs --- actionpack/lib/action_dispatch/routing/mapper.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 873f78ec74..ca2e86f615 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -712,6 +712,7 @@ module ActionDispatch # constraints(:post_id => /\d+\.\d+) do # resources :comments # end + # end # # === Restricting based on IP # -- cgit v1.2.3 From ab880b9eb0aab83e9c000a89e9f0ca636a8b9f78 Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Tue, 10 May 2011 20:55:31 -0300 Subject: Follow code conventions on docs --- actionpack/lib/action_dispatch/routing/url_for.rb | 8 ++++---- actionpack/lib/action_dispatch/testing/assertions/selector.rb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/routing/url_for.rb b/actionpack/lib/action_dispatch/routing/url_for.rb index d4db78a25a..5893f86798 100644 --- a/actionpack/lib/action_dispatch/routing/url_for.rb +++ b/actionpack/lib/action_dispatch/routing/url_for.rb @@ -131,10 +131,10 @@ module ActionDispatch # # Examples: # - # url_for :controller => 'tasks', :action => 'testing', :host=>'somehost.org', :port=>'8080' # => 'http://somehost.org:8080/tasks/testing' - # url_for :controller => 'tasks', :action => 'testing', :host=>'somehost.org', :anchor => 'ok', :only_path => true # => '/tasks/testing#ok' - # url_for :controller => 'tasks', :action => 'testing', :trailing_slash=>true # => 'http://somehost.org/tasks/testing/' - # url_for :controller => 'tasks', :action => 'testing', :host=>'somehost.org', :number => '33' # => 'http://somehost.org/tasks/testing?number=33' + # url_for :controller => 'tasks', :action => 'testing', :host => 'somehost.org', :port => '8080' # => 'http://somehost.org:8080/tasks/testing' + # url_for :controller => 'tasks', :action => 'testing', :host => 'somehost.org', :anchor => 'ok', :only_path => true # => '/tasks/testing#ok' + # url_for :controller => 'tasks', :action => 'testing', :trailing_slash => true # => 'http://somehost.org/tasks/testing/' + # url_for :controller => 'tasks', :action => 'testing', :host => 'somehost.org', :number => '33' # => 'http://somehost.org/tasks/testing?number=33' def url_for(options = nil) case options when String diff --git a/actionpack/lib/action_dispatch/testing/assertions/selector.rb b/actionpack/lib/action_dispatch/testing/assertions/selector.rb index c67a0664dc..5fa91d1a76 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/selector.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/selector.rb @@ -169,7 +169,7 @@ module ActionDispatch # assert_select "title", "Welcome" # # # Page title is "Welcome" and there is only one title element - # assert_select "title", {:count=>1, :text=>"Welcome"}, + # assert_select "title", {:count => 1, :text => "Welcome"}, # "Wrong title or more than one title element" # # # Page contains no forms -- cgit v1.2.3 From e5524d538c0d0f39d655a78fc45d2122c0ff2f2a Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sat, 14 May 2011 11:15:43 +0200 Subject: minor edits after going through what's new in docrails --- actionpack/lib/action_dispatch/routing/mapper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index ca2e86f615..3ba6094fbb 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -352,7 +352,7 @@ module ActionDispatch # # [:constraints] # Constrains parameters with a hash of regular expressions or an - # object that responds to #matches? + # object that responds to matches? # # match 'path/:id', :constraints => { :id => /[A-Z]\d{5}/ } # @@ -373,7 +373,7 @@ module ActionDispatch # See Scoping#defaults for its scope equivalent. # # [:anchor] - # Boolean to anchor a #match pattern. Default is true. When set to + # Boolean to anchor a match pattern. Default is true. When set to # false, the pattern matches any request prefixed with the given path. # # # Matches any request starting with 'path' -- cgit v1.2.3