StimulusReflex is a new way to craft modern, reactive web interfaces with Ruby on Rails.
Questions tagged [stimulus-reflex]
30 questions
                    
                    2
                    
            votes
                
                1 answer
            
        Stimulus not Adding Listeners to Search Form Input
I'm trying to create a search-as-you-type search box on my Rails 7 app. The type-hit-enter search works, and it's loading in a turbo frame, but the js-driven search-as-you-type functionality is broken. The event listener for the search box isn't…
        
        Mitch
        
- 130
 - 1
 - 7
 
                    2
                    
            votes
                
                0 answers
            
        Stimulus controller to show/hide toolbox yet allow click
I have a content editable block that has a toolbox.  When you focus on the content editable block the toolbox will appear (it is a collapse button for the actual toolbar).  If you clock on the toolbox, need to add the Bootstrap class "active" to it.…
        
        Patrick Vellia
        
- 399
 - 2
 - 9
 
                    2
                    
            votes
                
                0 answers
            
        stimulus reflex Error invoking action "change->stimulus-reflex#__perform"
i use rails 6 on heroku and when i preform a reflex action the console logs:
i try to create a Mifal when i select a radio button
what can i do?
Error invoking action "change->stimulus-reflex#__perform"
"The ActionCable connection is not open!…
        
        Guy Natan
        
- 21
 - 3
 
                    2
                    
            votes
                
                1 answer
            
        rails aborted! Don't know how to build task 'stimulus_reflex:install'
bundle exec rails stimulus_reflex:install
gave me this error,
rails aborted! Don't know how to build task 'stimulus_reflex:install'
why?
(Commands in sequence...
rails new --skip-spring --webpack=stimulus chatter
yarn add redis cable_ready…
        
        user5531720
        
- 61
 - 6
 
                    2
                    
            votes
                
                1 answer
            
        How to access current_user in stimulus_reflex
In this reflex I want to set the lastupdateby field to the current_user. I haven't been able to get it to work. Is there something I need to do to get that value in a reflex? Any thoughts on what I am doing wrong? If I hard code the value instead of…
        
        spacerobot
        
- 265
 - 1
 - 5
 - 23
 
                    2
                    
            votes
                
                1 answer
            
        Custom stimulus reflex class
I am working on an experimental project in Rails 6. The purpose of this project for me is to learn new methodologies & play with new("ish") technologies.
In short, I am playing around with the Trailblazer infrastructure, stimulus_reflex &…
        
        HermannHH
        
- 1,732
 - 1
 - 27
 - 57
 
                    2
                    
            votes
                
                1 answer
            
        "The ActionCable connection is not open! `this.isActionCableConnectionOpen()` must return true before calling `this.stimulate()`"
I'am getting the above error while accessing stimulus reflex with rails 6.
  Increment <%= @count.to_i %>
 class VotesReflex <…
        
        sathibabu p
        
- 23
 - 3
 
                    1
                    
            vote
                
                1 answer
            
        Why is my Accordion not working using HTML and Stimulusjs
Please I need help with making this accordion work I am not too familiar with StimulusJS. The first accordion works fine but the rest does not respond. I have attached a snippet of the code here please let me know what I am doing wrong thank…
        
        moses ubah
        
- 11
 - 1
 
                    1
                    
            vote
                
                2 answers
            
        How to use view_component inside stimulus controller
Hi I am beginner in ROR and working on very simple project using view_components and stimulus js. I have InputCommentComponent view_component which I wanted to append as a child node in div by stimulus controller on click of Some button. But my…
        
        Afzal Ali
        
- 880
 - 8
 - 25
 
                    1
                    
            vote
                
                1 answer
            
        StimulusReflex: How to change the URL on reflex
We are using StimulusReflex and want to change the URL on specific reflexes (e.g. using the Browser pushState API, e.g. via cable_ready ??).
Is this a common thing with StimulusReflex? Are there good examples somewhere?
        
        Alexander Presber
        
- 6,429
 - 2
 - 37
 - 66
 
                    1
                    
            vote
                
                1 answer
            
        Drag and drop nested list with stimulus and Rails
I need to do a draggable (drag and drop) nested list with use of stimulus + RoR.
Expected behaviour: When user drops an item (item A) inside another one (Item B) - Item B should became parent item for Item A. Any tips how to approach this?
        
        MaciekR
        
- 262
 - 3
 - 17
 
                    1
                    
            vote
                
                0 answers
            
        Rails StimulusJS controller not connected on production
I am using StimulusJS + Stimulus Reflex and it's all working on development. When I deploy to production (Digital Ocean) the connected() method is not fired.
The ReflexClass is performed and the ActiveRecord is updated on the server-side but the JS…
        
        sparkle
        
- 7,530
 - 22
 - 69
 - 131
 
                    1
                    
            vote
                
                1 answer
            
        Stimulus Reflex access Application Controller variable
I use this Instance variable (@profile) declared in the Application Controller to check if the current user has rights to access the params[:profile_id]
class ApplicationController < ActionController::Base
  before_action :set_profile
 def…
        
        sparkle
        
- 7,530
 - 22
 - 69
 - 131
 
                    1
                    
            vote
                
                0 answers
            
        Stimulus Reflex Callbacks stopped working in production
Since I made some updates on my production server and redeployed the application, some of the client-side callbacks and promises between Stimulus Reflex and StimulusJS controllers suddenly stopped working. In development, everything is working fine,…
        
        Max Kirsch
        
- 441
 - 5
 - 24
 
                    0
                    
            votes
                
                0 answers
            
        Decorating Ruby on Rails model with Draper inside callback
I am using Cable Ready and draper gem in my rails project. I am having issues decorating inside a callback.
This is what I have in the AppPayment's model callback:
  after_save do
    cable_ready[SplitsChannel].text_content(
      selector:…
        
        Pedro Fontes
        
- 11
 - 2