Integrating Stimulus with Ruby on Rails - Getting Started
See original GitHub issueA humble hello to whoever may be reading this. I can’t tell you how excited I am for this framework. As an independent rails developer sprinkles of JS turn to spaghetti really quickly, this seems perfect.
My question:
Where does the Stimulus team recommend as best practice to put the JS controller files? For example, if I wanted to integrate a version of this walkthrough into an existing rails app.
I’ve spent the last hour + trying to integrate Stimulus into a demo rails 5 app and I can’t seem to get things wired up. I get the initializing Content Script message listener
in my console but I can’t seem to make the controller actions fire. I think it’s because I’m not putting these controllers in the right place?
Thanks so much any help is greatly appreciated.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:12
Top GitHub Comments
Thank you! @pacMakaveli and @dixpac you guys are awesome.
Totally what I needed to get things up and running!
Thanks again.
stimulusjs comes from Rails team yet there’s nothing in https://stimulusjs.org/handbook/installing on installing it on Rails. This is bullshit. Either stick to your values or ditch them. There’s nothing about webpack on https://edgeguides.rubyonrails.org/asset_pipeline.html page. Again, you should pick a strategy and hold onto it.