All Questions
Tagged with ruby-on-rails-7 hotwire-rails
59
questions
1
vote
0
answers
56
views
Javascript error running Rails 7 app on IOS iPhone/iPad
We have an app build in Rails 7 with a Postgres database and uses Bootstrap 5 for the UI components. Pretty basic but effective app.
The app works fine on Windows and Mac browsers and on most Android ...
1
vote
1
answer
201
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 ...
0
votes
1
answer
54
views
Set default request as TURBO_STREAM in rails 7
I have a newly created Rails 7 application, in that application, I am using form_with, link_to, and button_to and all these tags are sending the request as HTML, I want it to be processed as a ...
1
vote
1
answer
51
views
Hamburger Menu Goes Down, But Not Up
I am using Ruby on Rails 7. Bootstrap 5. My hamburger menu will open, but will not close. All other dropdowns work fine. Here is my code:
<nav class="navbar navbar-expand-lg bg-dark border-...
0
votes
0
answers
86
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 ...
0
votes
1
answer
125
views
Setting button/other element display state based on form input values using Hotwire Stimulus
I have a form which has a text input, a file input, and a submit button.
I want to modify the display of the button in response to input changes, where it should be enabled if either of the input ...
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 ...
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
43
views
How to update independent pieces of a web page with turbo frames and turbo streams in ruby on rails
Am building a blog post and i have a model named comments, i have
used the same model also for replies .
comment.rb
class Comment < ApplicationRecord
include ActionView::Helpers
belongs_to ...
1
vote
2
answers
420
views
How to render partials recursively with turbo frames and stream
Hello, I'm relatively new to Turbo Streams and Frames, and I'm currently facing an issue with rendering replies to comments using Turbo Frames and Streams.
Let me explain my setup. I have a Comment ...
1
vote
1
answer
280
views
Turbo Streams in Rails 7
I have been following this tutorial https://www.youtube.com/watch?v=TKIbtbYyRdE&list=PL6SEI86zExmvb4qjVHJWrKRQrKjWksQ81&index=34 followed by its 2nd part
https://www.youtube.com/watch?v=...
1
vote
0
answers
289
views
Rails 7 with turbo and JS event listeners
I use Rails 7 and turbo. I want to use a Bootstrap 5 admin theme but having the following issue:
To bind the click event to the menu toggle button, there is some code like this:
let menuToggler = ...