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

cable_ready:channel generator has some issues #130

Closed
leastbad opened this issue May 25, 2021 · 1 comment · Fixed by #233
Closed

cable_ready:channel generator has some issues #130

leastbad opened this issue May 25, 2021 · 1 comment · Fixed by #233
Assignees
Labels
bug ruby Pull requests that update Ruby code

Comments

@leastbad
Copy link
Contributor

  1. rails destroy cable_ready:channel Sailor does not seem to destroy anything.
  2. It can't seem to locate the Stimulus controller template?

In this case I'd previously run the generator with "y" to broadcast_to, "Sailor" for the resource name, and "y" for the Stimulus controller. It complained about not finding the controller template in any of my source paths, as shown below.

~/testcr  $ rails destroy cable_ready:channel Sailor
Running via Spring preloader in process 69822
    generate  channel
       rails  generate channel sailor
Are you streaming to a resource using broadcast_to? (y/N) y
Which resource are you streaming for? (Sailor) 
Are you going to use a Stimulus controller to subscribe to this channel? (y/N) y
Could not find "app/javascript/controllers/%file_name%_controller.js" in any of your source paths. Your current source paths are: 
/Users/leastbad/.rvm/gems/ruby-2.6.5/gems/cable_ready-5.0.0.pre0/lib/generators/cable_ready/templates

Happy to help troubleshoot. Let me know how I can be of assistance.

@leastbad leastbad added bug ruby Pull requests that update Ruby code labels May 25, 2021
@leastbad
Copy link
Contributor Author

It also occurs to me that if they do opt to install a Stimulus controller, perhaps we should remove the js channel subscriber class? It'll just sit there trying to subscribe but never succeeding (because it's not passing an ID).

At some future point we might want to give people a helper to generate a secure global id value, and provide instructions on how how to decode it in the Channel class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants