Questions tagged [turbo]
201 questions
1
vote
1 answer
turbo_frame_tag request with other formats than HTML
Given the following
<%= turbo_frame_tag dom_id(@item, "loader_helper"), src: home_index_path(@item) %>
This code will trigger with page load other request to specified controller
Started GET "/home/1" for ::1 at 2023-01-23 16:10:39 +0300
Processing…

zhisme
- 2,368
- 2
- 19
- 28
1
vote
1 answer
Turbo crashes with any command in Official Node Docker image (Alpine)
Turbo crashes when using any command (e.g. turbo build), even when a valid project and turbo.json exists. This doesn't seem to be a problem on Ubuntu, but only on Alpine (arm64).
I've tried all of the new versions but they have the same issue.
npm…

Ben Butterworth
- 22,056
- 10
- 114
- 167
1
vote
1 answer
Rails with turbo stream do not find the view matching the controller
I am on rails 7 with turbo-rails installed.
The controller call :
Processing by AdminController#show as TURBO_STREAM
The controller :
def show
respond_to do |format|
format.turbo_stream do
Rails.logger.debug 'IN THE TURBO…

Syl
- 3,719
- 6
- 35
- 59
1
vote
1 answer
Why is Turbo Action Cable within a job not working in system Rspec tests?
I am building a project in Rails with Turbo and Action Cable.
The project is working fine in development environment so far.
However, my system test is the only thing that is not working.
Surprisingly action cable does not respond.
This is my system…

Chiara Ani
- 918
- 7
- 25
1
vote
1 answer
How to show percent done of a file upload with turbo_stream and no custom js?
I have a form with:
<%= form_with(model: doc, url: my_docs_path(@application, doc), id: "#{dom_id(doc)}_form", html: {multipart: true}) do |form| %>
<%= form.file_field :doc %>
<%= form.submit 'Upload Doc' %>
<% end %>
which hits my…

Andrew Arrow
- 4,248
- 9
- 53
- 80
1
vote
1 answer
Stimulus JS controllers not connecting. Rails 7 // importmap // stimulus
I recently got rid of webpacker and installed importmap and turbo. My Stimulus JS controllers are not rendering anything.
importmap.rb :
# Pin npm packages by running ./bin/importmap
pin "application", preload: true
pin "@hotwired/stimulus", to:…

Ouska
- 17
- 5
1
vote
0 answers
Can I visit external urls with turbo native without opening external browser?
I have a web application that uses turbo and now I want to create a web application using turbo native. However, I need to do some redirecting to external urls for identification and it won’t work if the external urls are opened in an external web…

samueletc
- 13
- 5
1
vote
0 answers
Listen for Turbo Frame Loads
According to the Turbo Handbook, there is a turbo:frame-load event, so I was trying to listen to that, but doesn't seem to work.
JS:
const contentFrame =…

Patrick Vellia
- 399
- 2
- 9
1
vote
0 answers
symfony turbo-stream doesn't load in turbo-frame
I set up a project for test purpose, it works. But in another project, the above code doesn't work. The content of the turbo-stream appears in raw html and replaces the whole site.
//_parts/_dashboard_user_ranking.stream.html.twig

eric
- 11
- 2
1
vote
1 answer
Turbo Frames not recognizing Javascript from the head
I'm working on building my template and have the initial steps down. I'm on Rails 7.0.2.4, turbo-rails 1.1.1, Bootstrap 5.
In my layouts template's I have the following:
= javascript_include_tag "application", data:{turbo:{track: "reload"}},…

Patrick Vellia
- 399
- 2
- 9
1
vote
1 answer
Rails 7 and Turbo Frames full page reload
I'm testing out the Turbo Frames and so far the frame works as described in the documentation.
// First Page
= turbo_frame_tag "main" do
%p Testing Turbo Out
link_to "Test it", other_page_path
// Other View
= turbo_frame_tag "main" do
%p is…

Patrick Vellia
- 399
- 2
- 9
1
vote
0 answers
Rails: Reconfigure turbo stream not to use Redis
Last week I was working through a chat app tutorial that guided me through using Redis for a turbo stream. But then I stumbled across DHH's demo of Rails 7 where he hooks up the broadcast simply using Rails out of the box.
Now, when I try to follow…

Jeff Zivkovic
- 547
- 1
- 4
- 20
1
vote
2 answers
Why is my AASM state machine not triggered with Rails 7 Turbo patch links?
I just updated my Rails 6 app to Rails 7 and have problems updating my :patch and :delete links to Turbo.
For example, in one of my views I have this link...
link_to("Mark as sent", status_url(quote), :data => {:'turbo_method' => :patch})
...…

Tintin81
- 9,821
- 20
- 85
- 178
1
vote
1 answer
Rails: Turbo Frame / Turbo Stream element is not rendered the SECOND time I trigger it
In a view that displays a list of categories, there is a little part underneath that shows the "default" of these categories. When a user clicks there, it is replaced by a drop down form where they can select the new default. Upon submitting of the…

tkhobbes
- 368
- 3
- 16
1
vote
1 answer
Rails Turbo Stream Before Action
I'm trying out Turbo and Rails 7. Having a problem understanding where and how one would use the before action which Hotwire references:
Content to place before the element designated…

doer123456789
- 369
- 1
- 7
- 22