hotwired / stimulus-rails

Use Stimulus in your Ruby on Rails app
https://stimulus.hotwired.dev
MIT License
635 stars 91 forks source link

Is `hello_controller.js` necessary during install? #146

Closed joshuay03 closed 2 weeks ago

joshuay03 commented 2 weeks ago

When creating a new rails app with the default setup, stimulus:install adds a dummy hello_controller.js here, which in my experience eventually just ends up getting deleted since it isn't referenced in any of the new app's view templates for demoing purposes.

Seeing as the turbo:install step doesn't create any dummy controllers and view templates that utilize frames, streams etc., nor any stimulus, and it's up to the user to read the handbook and figure it out for themselves, can we assume the same for stimulus controllers and drop this file? The controller is pretty basic anyway and not really a preview of all the available stimulus APIs.

I'm happy to get a PR up to remove it if needed.

dhh commented 2 weeks ago

Yeah, we can delete it. Do a PR 👍

joshuay03 commented 2 weeks ago

https://github.com/hotwired/stimulus-rails/pull/147