stimulusreflex / stimulus_reflex

Build reactive applications with the Rails tooling you already know and love.
https://docs.stimulusreflex.com
MIT License
2.26k stars 171 forks source link

Option to specify the reflex url manually #626

Open krebbl opened 1 year ago

krebbl commented 1 year ago

Feature Request

Is your feature request related to a problem?

I have a modal dialog which is loaded via a turbo frame. When the dialog is opened the URL of the page stays the same. For example /codes. The URL of the dialog is /codes/new. Now when a reflex is triggered inside the form the library uses the window url /codes which leads to the problem that the index action is called instead of the new action.

Describe the solution you'd like

I would like to be able to change the url of the reflex data inside the before hook.

svyatogor commented 4 months ago

I was wondering the same thing. Ended up using morph to update the dialog.