Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rescue_from documentation in Action Cable Overview guide [ci skip] #38781

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions guides/source/action_cable_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ verified_user = User.find_by(id: cookies.encrypted['_session']['user_id'])

By default, unhandled exceptions are caught and logged to Rails' logger. If you would like to
globally intercept these exceptions and report them to an external bug tracking service, for
example, you can do so with `rescue_with`.
example, you can do so with
[`rescue_from`](https://api.rubyonrails.org/classes/ActiveSupport/Rescuable/ClassMethods.html#method-i-rescue_from).

```ruby
# app/channels/application_cable/connection.rb
Expand Down Expand Up @@ -198,9 +199,8 @@ end

#### Exception Handling

As with `ActionCable::Connection::Base`, you can also use
[`rescue_with`](https://api.rubyonrails.org/classes/ActiveSupport/Rescuable/ClassMethods.html)
on a specific channel to handle raised exceptions:
As with `ActionCable::Connection::Base`, you can also use `rescue_from` on a
specific channel to handle raised exceptions:

```ruby
# app/channels/chat_channel.rb
Expand Down