From 290d82ada0aae05f2f1364e3a50a9b1e3f77245c Mon Sep 17 00:00:00 2001 From: Zlatko Zahariev Date: Mon, 24 Jun 2019 19:12:44 +0300 Subject: [PATCH] [ci skip] Remove mentioning of the devise gem --- guides/source/action_cable_overview.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/guides/source/action_cable_overview.md b/guides/source/action_cable_overview.md index 622cb0b4ea..0ba36cb2d2 100644 --- a/guides/source/action_cable_overview.md +++ b/guides/source/action_cable_overview.md @@ -120,13 +120,9 @@ by this same current user, you're also ensuring that you can later retrieve all connections by a given user (and potentially disconnect them all if the user is deleted or unauthorized). -If you use Devise for authenticaion, you can get `current_user` from warden: - -```ruby - verified_user = env['warden'].user -``` - -In any other authentication approach you can access the session cookie. If you use cookie store for the session, your session cookie is named "\_session" and the user ID key is "user_id" you can use this approach: +If your authentication approach includes using a session, you use cookie store for the +session, your session cookie is named `_session` and the user ID key is `user_id` you +can use this approach: ```ruby verified_user = User.find_by(id: cookies.encrypted['_session']['user_id']) ```