aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-07-04 14:03:50 -0700
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-07-04 14:03:50 -0700
commitf3f46a6f4ac2a1fd2dd6fa9af245641f32c9bc59 (patch)
tree7d480cbff24f827f12c8e55e6f6e8b3d649386a0 /guides/source
parent3caf9a74eb49e6946aee9bcef6dd5d67bb6dab0e (diff)
parent867138aa9909e8371340e38db12faf59a43ae31e (diff)
downloadrails-f3f46a6f4ac2a1fd2dd6fa9af245641f32c9bc59.tar.gz
rails-f3f46a6f4ac2a1fd2dd6fa9af245641f32c9bc59.tar.bz2
rails-f3f46a6f4ac2a1fd2dd6fa9af245641f32c9bc59.zip
Merge pull request #11303 from evsyukovmv/specify-request-method-in-guides
Specify request method in guides [ci skip]
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/action_controller_overview.md2
-rw-r--r--guides/source/i18n.md2
2 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/action_controller_overview.md b/guides/source/action_controller_overview.md
index f1600fe458..05d8422e56 100644
--- a/guides/source/action_controller_overview.md
+++ b/guides/source/action_controller_overview.md
@@ -160,7 +160,7 @@ NOTE: Support for parsing XML parameters has been extracted into a gem named `ac
The `params` hash will always contain the `:controller` and `:action` keys, but you should use the methods `controller_name` and `action_name` instead to access these values. Any other parameters defined by the routing, such as `:id` will also be available. As an example, consider a listing of clients where the list can show either active or inactive clients. We can add a route which captures the `:status` parameter in a "pretty" URL:
```ruby
-match '/clients/:status' => 'clients#index', foo: 'bar'
+get '/clients/:status' => 'clients#index', foo: 'bar'
```
In this case, when a user opens the URL `/clients/active`, `params[:status]` will be set to "active". When this route is used, `params[:foo]` will also be set to "bar" just like it was passed in the query string. In the same way `params[:action]` will contain "index".
diff --git a/guides/source/i18n.md b/guides/source/i18n.md
index 062da3877b..a5bf8b333a 100644
--- a/guides/source/i18n.md
+++ b/guides/source/i18n.md
@@ -253,7 +253,7 @@ You would probably need to map URLs like these:
```ruby
# config/routes.rb
-match '/:locale' => 'dashboard#index'
+get '/:locale' => 'dashboard#index'
```
Do take special care about the **order of your routes**, so this route declaration does not "eat" other ones. (You may want to add it directly before the `root :to` declaration.)