diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-10-15 21:55:12 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-15 21:55:12 +0900 |
commit | 25d1fefe877095a539a99df9db404d7fd994ed7c (patch) | |
tree | c0bf456b9c59493b68ae7d1b78341179d3ab5299 | |
parent | 6fe45f378ab7bc88fecb99576fa367f83b3255f3 (diff) | |
parent | 4c15ed775304abd9e3e41afef4e7fec4077f699b (diff) | |
download | rails-25d1fefe877095a539a99df9db404d7fd994ed7c.tar.gz rails-25d1fefe877095a539a99df9db404d7fd994ed7c.tar.bz2 rails-25d1fefe877095a539a99df9db404d7fd994ed7c.zip |
Merge pull request #34214 from brasscapon/rails_five
Update snippet to rails 5 syntax
[ci skip]
-rw-r--r-- | guides/source/action_controller_overview.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/action_controller_overview.md b/guides/source/action_controller_overview.md index 43bc9306ce..aa746e4731 100644 --- a/guides/source/action_controller_overview.md +++ b/guides/source/action_controller_overview.md @@ -166,7 +166,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 -get '/clients/:status' => 'clients#index', foo: 'bar' +get '/clients/:status', to: '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", as if it were passed in the query string. Your controller will also receive `params[:action]` as "index" and `params[:controller]` as "clients". |