diff options
author | Adam Demirel <adxm@msn.com> | 2018-10-15 15:14:48 +1100 |
---|---|---|
committer | Adam Demirel <adxm@msn.com> | 2018-10-15 15:14:48 +1100 |
commit | 4c15ed775304abd9e3e41afef4e7fec4077f699b (patch) | |
tree | b38875ad8dc6a2d12396c59588f3d620a44152ce | |
parent | 81bbcea6cd0c0095614c2c4af3a01d692dcc7a64 (diff) | |
download | rails-4c15ed775304abd9e3e41afef4e7fec4077f699b.tar.gz rails-4c15ed775304abd9e3e41afef4e7fec4077f699b.tar.bz2 rails-4c15ed775304abd9e3e41afef4e7fec4077f699b.zip |
Update snippet to rails 5 syntax
-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". |