aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/README.md
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2016-04-15 17:14:33 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2016-04-15 19:16:01 +0900
commita2f034335d13824f30a956e55e60917f3599481e (patch)
tree21932a5370e8c4b8094ea735336e195d6a4ce31e /actioncable/README.md
parent53ab1ee5652ead8d5e52e5a9c177a6f8a32c75b1 (diff)
downloadrails-a2f034335d13824f30a956e55e60917f3599481e.tar.gz
rails-a2f034335d13824f30a956e55e60917f3599481e.tar.bz2
rails-a2f034335d13824f30a956e55e60917f3599481e.zip
update example to specify the Action Cable mount path [ci skip]
Follow up to 8b69f1e
Diffstat (limited to 'actioncable/README.md')
-rw-r--r--actioncable/README.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/actioncable/README.md b/actioncable/README.md
index 595830feb0..de67b507a7 100644
--- a/actioncable/README.md
+++ b/actioncable/README.md
@@ -412,12 +412,12 @@ The above will start a cable server on port 28080.
### In app
-If you are using a server that supports the [Rack socket hijacking API](http://www.rubydoc.info/github/rack/rack/file/SPEC#Hijacking), Action Cable can run alongside your Rails application. For example, to listen for WebSocket requests on `/cable`, mount the server at that path:
+If you are using a server that supports the [Rack socket hijacking API](http://www.rubydoc.info/github/rack/rack/file/SPEC#Hijacking), Action Cable can run alongside your Rails application. For example, to listen for WebSocket requests on `/websocket`, specify that path to `config.action_cable.mount_path`:
```ruby
-# config/routes.rb
-Example::Application.routes.draw do
- mount ActionCable.server => '/cable'
+# config/application.rb
+class Application < Rails::Application
+ config.action_cable.mount_path = '/websocket'
end
```