Skip to main content

All Questions

Tagged with
1 vote
0 answers
30 views

Rails 7.1 Turbo stream not working on localhost, but works when deployed to Heroku

I have a very simple Rails 7.1.3.4 app that is essentially a dashboard, where it uses Turbo Streams to display model attributes in real-time. When I deploy my app to Heroku, everything works as ...
dizzy33's user avatar
  • 11
1 vote
0 answers
42 views

Rails Gems that use JS not loading when navigating with Turbo in Production

I have a Rails 7 app using Turbo and ESBuild. Some of my Gems (Recaptcha, Chartkick etc) also have a JS component. While on my localhost everything works fine, after uploading to Heroku the charts and ...
almo's user avatar
  • 6,287
1 vote
1 answer
200 views

Understanding StimulusJS connect() vs initialize() in context of turbo/hotwire

The Stimulus handbook describes the difference between connect/initialize as: initialize(): Invoked only once, when the controller is first instantiated connect(): Invoked anytime the controller is ...
APysnack's user avatar
  • 103
1 vote
0 answers
45 views

Issues with Turbo Stream updates in Rails real-time voting app with iterative "rounds" after second iteration

I'm working on a Rails application that utilizes Turbo Streams for a real-time voting feature within a game room. Each game room progresses through multiple voting rounds, with a "lock votes"...
geo's user avatar
  • 11
0 votes
1 answer
41 views

turbo_stream first comment is getting replace by the other comment without reloading page

_post.html.erb <div class="card text-center bg-secondary my-2" style="width: 18rem;"> <div class="card-footer text-body-secondary"> ...
Yash's user avatar
  • 13
0 votes
0 answers
29 views

Nested partials were not working in turbo stream rails 7

comments_controller.rb class CommentsController < ApplicationController before_action :fetch_post def index end def new end def create @comment = current_user.comments.build(...
Yash's user avatar
  • 13
1 vote
1 answer
62 views

Partial render with turbo stream is not working in rails 7

_posts.html.erb <div class="container col-sm-4 mx-auto mt-4"> <% posts.each do |post| %> <%= turbo_frame_tag dom_id(post) do %> <div ...
Yash's user avatar
  • 13
0 votes
0 answers
48 views

Unexpected login behaviour in production in my Rails 7 app

I have a Rails 7 app with basic login functionality that authenticates and logs in the user. This works fine in development mode. After deploying to render.com I keep being redirected back to the the ...
Matthias's user avatar
  • 1,933
3 votes
0 answers
360 views

turbo-progress-bar in Rails 7 does not hide after complete

I am using Rails 7 and Turbo. Rails 7 comes with the turbo-progress-bar, abar that shows a loading status if a page takes more than 500ms to load. https://turbo.hotwired.dev/handbook/drive#displaying-...
almo's user avatar
  • 6,287
0 votes
0 answers
72 views

Installing jquery in rails 7 breaks turbo

I have a rails 7 app with turbo-rails 1.1.1. In my app "turbo-method": :delete works as expected for my logout delete route. After installing jquery 0.0.1 through bundle add and adding ...
Matthias's user avatar
  • 1,933
1 vote
0 answers
176 views

turbo_method: :delete not working for destroying users in Rails 7

Can anyone tell me why the following is not working in Rails 7? <%= link_to "delete", user, data: { turbo_method: :delete } %> The expected action was a DELETE request routed to the ...
Matthias's user avatar
  • 1,933
0 votes
1 answer
87 views

Menu "flashes" in Rails 7 and Turbo

I am trying to build a very simple menu with submenus using Rails 7, Bootstrap 5 and Jquery. HTML: <div> <button class="toggle-submenu">Sales</button> <div ...
almo's user avatar
  • 6,287
0 votes
0 answers
187 views

Accessing target from outside Turbo Frame

Hi there, I have this modal that has a button inside: <%= turbo_frame_tag 'select_recipients_modal', id: "select_recipients_modal", data: { controller: "recipients" } do %&...
Gibson's user avatar
  • 2,085
0 votes
2 answers
756 views

How to prevent Turbo progress bar and spinning activity indicator from Rails 7 link_to

I have a Rails 7 app with Turbo and Stimulus. I have a link_to that triggers a controller action but not a render or redirect. The basic functionality is correct, but clicking the link initiates the ...
Steve Schwedt's user avatar
0 votes
0 answers
55 views

The change is gone in editing page when remove pictures wuth turbo_frame

I made some change in edit page and then remove some pictures without refreshing page since turbo_frame, and if I click "update" the page refresh and the change in text are gone, it only ...
swaeetpotato's user avatar

15 30 50 per page