420 questions
0 votes
2 answers
65 views
Turbo not working when form is hidden then dispayed toggling display attribute
In a rails 8 application I have two models: Recipe and Ingredient In the "show" action for recipe I display all the child ingredients, one per row. Each ingredient has edit and delete links, ...
0 votes
0 answers
39 views
How to deploy(bundle) custom JS and Modules from Rails-Engine in Rails Application using Vite-Rails
Given the following setup: Rails Gem with mountable Engine containing some common functionality using Ruby- and Javascript-Code. Javascript is mainly used in Stimulus-Controllers Rails 8 Application ...
0 votes
0 answers
117 views
Turbo back button navigation not working correctly with multiple lazy-loaded Turbo Frames in Rails 7
I am working on a Ruby on Rails 7 application using Turbo (Hotwire). I want to implement proper browser history navigation across the entire application. Here’s the issue: On the home page, multiple ...
0 votes
0 answers
38 views
Stimulus useDirtyFormTracking - how to update data-detect-dirty-load-value after form submission
Reference Link: https://sub-xaero.github.io/stimulus-library/docs form_controller.js import { Controller } from '@hotwired/stimulus'; import { useDirtyFormTracking } from "stimulus-library"; ...
0 votes
1 answer
116 views
Stimulus controllers in subfolder without prefix
I'm upgrading a Rails 6 app using Webpacker to Rails 7 with importmap. My app/javascript/controllers includes some controllers and the legacy folder with other controllers. By default, I can refer to ...
0 votes
1 answer
131 views
Rails controller-helper and view components
I have a bleeding edge Rails project (8.1) using the splendid View Components. I've made an image-modal component, triggered from a plain HTML anchor and that toggles visibility on a HTML dialog (...
1 vote
1 answer
90 views
Is there a way to Use Stimulus to toggle Boolean values in ruby on rails?
I am creating an example project for my company and have to set up flagging for posts. I have used forms to setup post flagging method for users to flag posts in case of bad content. Here is the view &...
0 votes
0 answers
64 views
Adding stimulus to a form made it stop working
this is a new question that originated in a previous one that I made, but I didn't wanted to mix everything up. I'm trying to add a preview when uploading an image to a form using stimulus. I got the ...
0 votes
1 answer
125 views
Trying to create a preview with stimulus doesn't work in Rails
I am trying to add a preview when uploading an image, and I've came across this tutorial: "Image Previews with Active Storage in Ruby on Rails 7" I followed every step but I realized that ...
0 votes
1 answer
120 views
How to pass prototype to Stimulus controller?
I am building the Symfony form with a CollectionType field. The application logic assumes that new items can be added. To be short in explanation what is done, I am providing the link from the ...
0 votes
2 answers
110 views
Stimulus Not Setting focus for newly connected Controllers
I have a simple checklist adding functionality, with two different checklists on the page. Turbo adds the form to the frame, and then i'm trying to set the focus using stimulus. The trouble is, when ...
0 votes
1 answer
156 views
Rails 8/Stimulus: Why is JS unresponsive after back button is pressed?
I have a view with this partial: <div class="player stack outer-box"> <h1><%= @task.story.title %></h1> <audio id="player" controls data-controller=&...
0 votes
0 answers
223 views
Can't import anything from the Flowbite lib in a Rails 8 app (module 'flowbite.turbo.min.js' doesn't provide an export named: '...')
The stack is: RoR 8 + turbo-rails + propshaft + importmaps-rails + tailwindcss-rails + Flowbite. I have completed the integration steps from the Flowbite guide to add Flowbite to my Rails app. At ...
0 votes
0 answers
130 views
Is it possible to pass data from Stimulus controller to an ActionController?
I am using Rails, Hotwire Stimulus and Chartkick. First of all, I want to be able to click on the chart's specific datasets (columns/groups) and be able to export the data related to that clicked ...
0 votes
1 answer
218 views
Symfony Stimulus controller target not recognize on initialize() but recognize on connect()
Dealing with Symfony 7 project that it use Hotwire technologies (Stimulus, Turbo), I'm facing with strange issue with my Stimulus controller. I have a target controller Stimulus that recognize onto ...