Skip to content

Commit

Permalink
Merge pull request #38781 from rmacklin/fix-method-name-in-action-cab…
Browse files Browse the repository at this point in the history
…le-guide

Fix `rescue_from` documentation in Action Cable Overview guide [ci skip]
  • Loading branch information
eugeneius committed Mar 21, 2020
2 parents 3c362f0 + 0c3f320 commit aeac447
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions guides/source/action_cable_overview.md
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

0 comments on commit aeac447

Please sign in to comment.