Rails Stimulus Generator
Add the gem to your Gemfile
rails g stimulus Hello
The generated Stimulus controller will look like this:
Assumed directory structure
This generator assumes that your Stimulus controllers live in
the generator will create the directory when it runs.
Clone this repository to your local machine and run
The basic structure of this generator was inspired by stimulus-generator-rails. My preference is to structure my controllers by function instead of by action, so I created this gem for those with a similar need and a standard Rails 6 + webpack directory structure.
This gem is available as open source under the terms of the MIT License.