StimulusReflex is a new way to craft modern, reactive web interfaces with Ruby on Rails.
Questions tagged [stimulus-reflex]
30 questions
0
votes
0 answers
Event name for click-move-click Rails, Stimulus and OpenLayers
I want to draw a rectangle over a static image (OpenLayers jpg, not a map). My Main issue is with Stimulus.
How do I set up the drawing which is probably a click and drag, but could be a click-move-click.
Rails Stimulus HTML
<% doc_image_width=…

Greg
- 2,359
- 5
- 22
- 35
0
votes
1 answer
How do I test a reflex in StimulusReflex?
I created a small rails app using StimulusReflex and testing it with Rails' standard minitest framework.
I want to write a "controller" test that invokes a reflex and tests the controller response, but that seems to be impossible. Any hint on how to…

Alexander Presber
- 6,429
- 2
- 37
- 66
0
votes
1 answer
Uncaught TypeError: Cannot read property 'schema' of undefined at stimulus_reflex.js:328 at utils.js:50
I had reinstalled stimulus reflex for publishing and unpublishing a post.
but the button is not working, it gives me that error in the console. I don't know where I went wrong.
stimulus_reflex.js
var StimulusReflexController = /*#__PURE__*/function…

Allan Solitei
- 7
- 3
0
votes
1 answer
Rails & Stimulus for dynamic nested attribute forms
there, I'm coming back to Rails after years of only using it for APIs. There all sorts of new things and I'm trying to figure out how to accomplish some stuff with the new frameworks. One example is creating a form with accept_nested_attributes…

Brad Herman
- 9,665
- 7
- 28
- 30
0
votes
1 answer
Implementing a confirm delete (archive) with StimulusReflex not working
Using Bootstrap, StimulusReflex and Discard in a Rails application, I'm trying to implement a confirm modal before the actual reflex action is called. As it is now, this does not work and bypasses the modal. Here is the html/erb code:

Demian Sims
- 871
- 1
- 14
- 29
0
votes
1 answer
Stimulus reflex stopped working in production rails 6
I have a blog and use stimulus_reflex to approve/unapprove comments on posts. I also use it to publish/unpublish posts. It works fine on the localhost and was working on the production server but it is no longer working. The only thing I did was…

Stephen Scott Moore
- 345
- 3
- 17
0
votes
1 answer
Create a like button with Stimulus Reflex
business class
class Business < ApplicationRecord
.........
belongs_to :user
has_many :likes
like class
class Like < ApplicationRecord
belongs_to :user
belongs_to :business
.....
user class
class User < ApplicationRecord
…

foliwe83
- 546
- 1
- 7
- 24
0
votes
0 answers
Stimulus Reflex drop down with selectize.js
I have a search form for an index page following the tabular demo. It works perfectly. The list I have that I want to filter by is quite long and I wanted to make it searchable so I added selectize.js, that piece also works just fine.
The problem is…

Scott
- 2,248
- 3
- 22
- 24
0
votes
1 answer
How to use redirect_to like method in stimulus reflex?
I am trying to learn stimulus reflex. Working on a basic project management app where I am trying to redirect_to some path from controller. How can I do this using stimulus reflex

Sampurna
- 1
- 3
0
votes
1 answer
Stimulus Reflex Render Whole Page, Not Reflex-Root
I use Stimulus Reflex in my view. Even I use data-reflex-root in my parent div, whole page re-rendered. How can I fix this issue?
My code looks like this;
…

Muhammed Tüfekyapan
- 105
- 8
0
votes
2 answers
How can I use a Custom Channel of Action Cable with Stimulus Reflex and View Component?
So, I'm working on a project that should have a chat component same as the linkedin chat, where the user will have all their contacts and messages.
But, I've tried of all ways to work with stimulus_reflex and view_component to create this chat_box,…

Pedro Souza
- 3
- 2
0
votes
2 answers
The opposite of insert_adjacent_html for CableReady channel?
Problem has been answered -- see post below
I have a CableReady channel 'Current' which dynamically shows a feed of 'Posts'. I can get the posts to appear individually just fine, but I can't work out how to remove them from the channel…

Jack Riminton
- 130
- 1
- 8
0
votes
2 answers
Rails 6 app with stimulus reflex deployment on Heroku problem
I deploy my Rails 6 app (with stimulus-relflex) on Heroku. Everything work find including my jQuery and JS but anything related to stimulus-relfex dont work? Everything work fine on my local dev machine. Any ideas?

Eric Chapman
- 9
- 1
0
votes
1 answer
Stimulus Reflex Lifecycle events
This gist is an app which use Stimulus Reflex. It's about a pagination reflex, the thing is I need to hide is the spinner when afterReflex() callback is executed, but sometimes it doesn't…

Joseph Palmezano
- 1,245
- 2
- 11
- 16
0
votes
1 answer
Why is Rails 6 Stimulus Reflex re-rendering the page with duplicate content?
I have been working on getting Stimulus Reflex up and running in an existing Rails 6 app. Success! I have a couple reflexes in action, ActionCable is doing its job...all good. However, after the reflex is successful and Stimulus communicates via…

hellion
- 4,602
- 6
- 38
- 77