Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [turbo-rails]

The tag has no usage guidance.

turbo-rails
0 votes
0 answers
43 views

Turbo Stream Response Only Works On Show | Rails 7.1

Part One: This is my controller action - def update respond_to do |format| if @user.update(user_params) format.turbo_stream { redirect_to user_url(@user), notice: "...
scottkekoa's user avatar
0 votes
1 answer
55 views

Rails: problem with "@hotwired/turbo-rails" and redirects

// app/javascript/application.js import "@hotwired/turbo-rails" import "controllers" import "trix" import "@rails/actiontext" import Rails from "@rails/ujs&...
Steven's user avatar
  • 13
0 votes
1 answer
68 views

Rails Turbo Frames: "Content missing" after Update-action (View doesn't update)

I like to use Turbo Frames in my existing Rails-App. index.view looks now this way: <h1>Projects List</h1> <div><strong><%= pluralize(@projects.size, "Project") %> ...
cluster1's user avatar
  • 5,468
1 vote
0 answers
32 views

How do I populate intl-tel-input fields with turbo_stream?

I already have the number saved in my database, using a turbo_stream file and using the turbo_power library I need to change the empty value to the number I have in my database (example: +...
Hector Guarçoni's user avatar
0 votes
0 answers
42 views

Vue Components Not Rendering After Turbo Form Failure

I'm using @hotwired/turbo, rails 7, vue2 and everything seems to work well except when forms fail and a 422 is returned. The form rerenders with errors, but none of the vue components render. All of ...
karns's user avatar
  • 5,679
0 votes
1 answer
59 views

Turbo rails broadcast_refresh_to does not connect to stimulus controller

Using turbo 8.0.4. Blog model: after_update_commit lambda { |blog| } broadcast_refresh_to blog } In blogs/show.html.erb <%= turbo_stream_from @blog %> <%= tag.div data: {controller: &...
dp7's user avatar
  • 6,749
1 vote
2 answers
115 views

How to use Rails and Hotwire Turbo Streaming to Stream a Long Page?

I looked at https://turbo.hotwired.dev/handbook/streams and https://www.hotrails.dev/turbo-rails/turbo-streams , but did not see quite how to do this. I have a long page that many messages. When the ...
B Seven's user avatar
  • 45.5k
0 votes
2 answers
267 views

Setting up Turbo stream broadcasts_refreshes, websocket error

I'm trying to configure a Rails 7.1.3/Turbo 2.0.5 app locally to try out broadcasts_refreshes for a simple model. On the view template that tries to turbo_stream_from this model, I'm getting websocket ...
nimmolo's user avatar
  • 521
0 votes
0 answers
95 views

How to scroll to the start of the list on Turbo with Stimulus when submitting a form?

I have a Rails 7.1 application with Hotwire. I have a horizontal list that is wrapped in CSS overflow-y: auto and scroll-snap-type: x mandatory. This horizontal list is a simple render that is wrapped ...
Colibri's user avatar
  • 1,145
0 votes
0 answers
39 views

Rails 7 and Adminkit when I click the icons disappear

I'm trying to implement Adminkit in Ruby on Rails 7, using feather icons. The problem is that when I click on a link_to tag the icons do not appear again. At the same time this message appears in the ...
FerCib's user avatar
  • 3
0 votes
0 answers
41 views

Infinite Scroll with turbo-rails and vanilla js do not refresh data-fslightbox to add more images to gallery

I am using turbo-rails to implement post's infinite scroll. This posts have images and I use vanilla js to provider a good visualization of images as showed bellow: <%= link_to file, 'data-...
Christiano Matos's user avatar
1 vote
1 answer
199 views

Rails 7 turbo-rails error. with render_to_string method of ActionController. Could not render layout: undefined method `headers'

Ruby version 3.2.2 Rails version 7.0.8 Gemfile source 'https://rubygems.org' ruby '3.2.2' gem 'rails', '7.0.8' gem 'puma', '~> 4.3.9' gem 'sass-rails', '~>6.0.0' gem 'jquery-rails' gem '...
Jin Lim's user avatar
  • 2,062
0 votes
1 answer
57 views

Rails Form won't submit after redirecting from another page

This is a weird one and I believe it has something to do with how Turbo works. So I have an update form on one of my screens that looks something like this: <%= form_with model: @user, url: ...
crodev's user avatar
  • 1,443
5 votes
1 answer
3k views

Rails `link_to` with data-turbo doesnt get TURBO_STREAM request format

(Original question: Does Turbo.setFormMode("optin") disable turbo requests in links? No, the link doesn't work even with Turbo.setFormMode("on")) Mature app using Rails 6.1, ...
nimmolo's user avatar
  • 521
1 vote
3 answers
921 views

Turbo response to render javascript alert?

I am refactoring a Rails controller for turbo and stimulus, and trying to understand how to do things in Turbo that the app does currently with JS response templates. On a things#show page, I have a ...
nimmolo's user avatar
  • 521

15 30 50 per page
1
2 3 4 5 6