All Questions
Tagged with ruby-on-rails-7 turbo
52
questions
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 ...
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 ...
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 ...
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"...
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">
...
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(...
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 ...
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 ...
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-...
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 ...
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 ...
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 ...
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 %&...
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 ...
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 ...