Skip to content

Conversation

@AlanFoster
Copy link

Closes #16

I'm also happy go with an alternative implementation if there's any pointers on the preferred implementation details, or if a maintainer has a better pattern and would prefer to fix it directly and close this - that also works for me, thanks! 💯

@jho406
Copy link
Contributor

jho406 commented Nov 25, 2025

Thanks for this! I understand the issue now.

How do you feel about this pattern? https://github.com/hotwired/turbo-rails/blob/0eb3c0387401de5f14b0c9d18be640ffbad45ad0/lib/turbo/engine.rb#L30

@AlanFoster AlanFoster mentioned this pull request Nov 25, 2025
@AlanFoster AlanFoster force-pushed the add-optional-actioncable-error-handling branch from 1d9850a to 89ee1eb Compare November 25, 2025 16:48
@AlanFoster
Copy link
Author

Whatever you'd preference works for me 💯

I've extracted out the unrelated docs changes to a new PR to clean up this branch either way: #18

I'll double check that linked approach would work with my particular project now, although I imagine it will since it's in turbo-rails 😄

@AlanFoster AlanFoster force-pushed the add-optional-actioncable-error-handling branch from 89ee1eb to a6a13ef Compare November 25, 2025 16:59
@AlanFoster AlanFoster force-pushed the add-optional-actioncable-error-handling branch from a6a13ef to 9a850a2 Compare November 25, 2025 16:59
@AlanFoster
Copy link
Author

Verified as working 👍

Before - errors 🔴

/Users/dev/superglue_rails/app/channels/superglue/streams_channel.rb:4:in `<top (required)>': uninitialized constant ActionCable (NameError)

class Superglue::StreamsChannel < ActionCable::Channel::Base
                                   ^^^^^^^^^^^
Did you mean?  ActionMailer
	from /Users/dev/.rvm/rubies/ruby-3.3.8/lib/ruby/3.3.0/bundled_gems.rb:69:in `require'
...

After - no errors 🍏

@jho406 jho406 self-requested a review November 25, 2025 18:40
Copy link
Contributor

@jho406 jho406 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @AlanFoster !

@jho406 jho406 merged commit 72f10ff into thoughtbot:v2 Dec 1, 2025
@jho406
Copy link
Contributor

jho406 commented Dec 7, 2025

Thanks @AlanFoster i'll do a release tonight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants