aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2016-04-15 16:00:42 +0530
committerVipul A M <vipulnsward@gmail.com>2016-04-15 16:00:42 +0530
commit8ad9670abb2d662df6fd0cf3b363fb5bf6a09de3 (patch)
tree2e96aae02eef4934b6c7a674253c29f657c6b7bf /actioncable
parenta2de667b2eb97b387a9067277ab0829542f24841 (diff)
parenta2f034335d13824f30a956e55e60917f3599481e (diff)
downloadrails-8ad9670abb2d662df6fd0cf3b363fb5bf6a09de3.tar.gz
rails-8ad9670abb2d662df6fd0cf3b363fb5bf6a09de3.tar.bz2
rails-8ad9670abb2d662df6fd0cf3b363fb5bf6a09de3.zip
Merge pull request #24557 from y-yagi/update_example_to_specify_ac_mount_path
update example to specify the Action Cable mount path [ci skip]
Diffstat (limited to 'actioncable')
-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
```