From 16bee0f5bde72bf1e1833fddf36f8bdd2fc29390 Mon Sep 17 00:00:00 2001 From: henning mueller Date: Mon, 21 Dec 2015 09:35:37 +0100 Subject: Replaced "Cable" by "ActionCable" in CoffeeScript examples. --- actioncable/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actioncable') diff --git a/actioncable/README.md b/actioncable/README.md index 32f49c215f..a73e05cffa 100644 --- a/actioncable/README.md +++ b/actioncable/README.md @@ -364,7 +364,7 @@ Then add the following line to your layout before your JavaScript tag: And finally, create your consumer like so: ```coffeescript -App.cable = Cable.createConsumer() +App.cable = ActionCable.createConsumer() ``` For a full list of all configuration options, see the `ActionCable::Server::Configuration` class. @@ -408,7 +408,7 @@ Example::Application.routes.draw do end ``` -You can use `App.cable = Cable.createConsumer("/websocket")` to connect to the cable server. +You can use `App.cable = ActionCable.createConsumer("/websocket")` to connect to the cable server. For every instance of your server you create and for every worker your server spawns, you will also have a new instance of ActionCable, but the use of Redis keeps messages synced across connections. -- cgit v1.2.3 From cb6f337aac024e65def1297732f99d25980098f6 Mon Sep 17 00:00:00 2001 From: henning mueller Date: Mon, 21 Dec 2015 09:44:02 +0100 Subject: Use default cable path in (in-app) server config example. --- actioncable/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actioncable') diff --git a/actioncable/README.md b/actioncable/README.md index a73e05cffa..26de8c5b05 100644 --- a/actioncable/README.md +++ b/actioncable/README.md @@ -399,16 +399,16 @@ The above will start a cable server on port 28080. Remember to point your client ### In app -If you are using a threaded server like Puma or Thin, the current implementation of ActionCable can run side-along with your Rails application. For example, to listen for WebSocket requests on `/websocket`, match requests on that path: +If you are using a threaded server like Puma or Thin, the current implementation of ActionCable can run side-along with your Rails application. For example, to listen for WebSocket requests on `/cable`, match requests on that path: ```ruby # config/routes.rb Example::Application.routes.draw do - match "/websocket", :to => ActionCable.server, via: [:get, :post] + match "/cable", :to => ActionCable.server, via: [:get, :post] end ``` -You can use `App.cable = ActionCable.createConsumer("/websocket")` to connect to the cable server. +You can use `App.cable = ActionCable.createConsumer()` to connect to the cable server if `action_cable_meta_tag` is included in the layout. A custom path is specified as first argument to `createConsumer` (e.g. `App.cable = ActionCable.createConsumer("/websocket")`). For every instance of your server you create and for every worker your server spawns, you will also have a new instance of ActionCable, but the use of Redis keeps messages synced across connections. -- cgit v1.2.3 From 9f00021268ea5910bc6b4feb1c456ef16d85b22a Mon Sep 17 00:00:00 2001 From: henning mueller Date: Mon, 21 Dec 2015 10:05:28 +0100 Subject: One long dash in headline. --- actioncable/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actioncable') diff --git a/actioncable/README.md b/actioncable/README.md index 26de8c5b05..6dbc1bfe03 100644 --- a/actioncable/README.md +++ b/actioncable/README.md @@ -1,4 +1,4 @@ -# Action Cable –- Integrated WebSockets for Rails +# Action Cable – Integrated WebSockets for Rails Action Cable seamlessly integrates WebSockets with the rest of your Rails application. It allows for real-time features to be written in Ruby in the same style -- cgit v1.2.3