From 25989c9ea2c339ae7566db831dd09872ba97f11b Mon Sep 17 00:00:00 2001
From: Keith Rowell <keith@keithrowell.com>
Date: Fri, 8 Oct 2021 07:24:24 +1000
Subject: [PATCH 1/3] corrected method name

---
 docs/integrations/action-cable.md | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/docs/integrations/action-cable.md b/docs/integrations/action-cable.md
index 97295fc2..65f211f5 100644
--- a/docs/integrations/action-cable.md
+++ b/docs/integrations/action-cable.md
@@ -85,10 +85,10 @@ module ApplicationCable
 
     protected
 
-    def find_verified_admin
+    def find_verified_user
       if verified_user = env['warden'].user
         verified_user
-      else 
+      else
         reject_unauthorized_connection
       end
     end
@@ -102,7 +102,7 @@ Now we can create a channel which streams for a specific user, enabling us to se
 
 ```ruby
 # app/channels/current_user_channel.rb
-class CurrentUserChannel < ApplicationCable::Channel  
+class CurrentUserChannel < ApplicationCable::Channel
   def subscribed
     stream_for current_user
   end
@@ -117,7 +117,7 @@ Emitting events for a user can now be done anywhere in your Rails application by
 
 ```ruby
 # sending to the current user
-CurrentUserChannel.broadcast_to(current_user, { 
+CurrentUserChannel.broadcast_to(current_user, {
   event: 'update'
 })
 
@@ -142,7 +142,7 @@ class Connection < ActionCable::Connection::Base
 
   protected
 
-  def find_verified_admin
+  def find_verified_user
     env['warden'].user
   end
 

From ea3d92dc4fea6bece51fe512d28157863b262935 Mon Sep 17 00:00:00 2001
From: Keith Rowell <keith@keithrowell.com>
Date: Thu, 7 Oct 2021 21:46:25 +0000
Subject: [PATCH 2/3] changed sentence wording

---
 docs/integrations/action-cable.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/integrations/action-cable.md b/docs/integrations/action-cable.md
index 65f211f5..bec2e4cf 100644
--- a/docs/integrations/action-cable.md
+++ b/docs/integrations/action-cable.md
@@ -225,5 +225,5 @@ PrivateChannel.broadcast_to(user, {
 
 ## Conclusion
 
-Creating channels and connections can be done like you want. To learn more about all the possibilities read Rails Guide about [ActionCable](https://guides.rubyonrails.org/action_cable_overview.html). Important for the use with matestack is to emit events in the JavaScript `received(data)` callback and have a clear structure to determine what the name of the event is which should be emitted. Like shown above we recommend using an `:event` key in your websocket broadcast, which represents the event name that gets emitted through the event hub. You optionally can pass all the received data as payload to that event or also use a specific key. As this is optional you don't need to pass any data to the event emit.
+Creating channels and connections can be done however you like. To learn more about all the possibilities read Rails Guide about [ActionCable](https://guides.rubyonrails.org/action_cable_overview.html). Important for the use with matestack is to emit events in the JavaScript `received(data)` callback and have a clear structure to determine what the name of the event is which should be emitted. Like shown above we recommend using an `:event` key in your websocket broadcast, which represents the event name that gets emitted through the event hub. You optionally can pass all the received data as payload to that event or also use a specific key. As this is optional you don't need to pass any data to the event emit.
 

From c212c0921aa156cd14c41280d564b82839ae4930 Mon Sep 17 00:00:00 2001
From: Keith Rowell <keith@keithrowell.com>
Date: Wed, 3 Nov 2021 16:05:54 +1000
Subject: [PATCH 3/3] correction

---
 docs/integrations/action-cable.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/integrations/action-cable.md b/docs/integrations/action-cable.md
index bec2e4cf..d67ec8cd 100644
--- a/docs/integrations/action-cable.md
+++ b/docs/integrations/action-cable.md
@@ -156,7 +156,7 @@ First a **public channel** to which every user can subscribe.
 ```ruby
 # app/channels/public_channel.rb
 class PublicChannel < ApplicationCable::Channel
-  def subscribe
+  def subscribed
     stream_from 'public'
   end
 end
@@ -181,7 +181,7 @@ Second a **channel only available for signed in users**. We reject clients that
 ```ruby
 # app/channels/private_channel.rb
 class PrivateChannel < ApplicationCable::Channel
-  def subscribe
+  def subscribed
     return reject unless current_user
     stream_for current_user
   end
