All Questions
Tagged with ruby-on-rails-7 turbo-rails
20
questions
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
0
answers
38
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 ...
0
votes
0
answers
39
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-...
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 = ...
2
votes
1
answer
833
views
Can't pass current_user into rails 7 turbo stream
I am trying to learn turbo with rails and have come to a problem that I can't seem to figure out. I have a structure where every Applicant has Messages. Two users can send messages to each other ...
1
vote
1
answer
783
views
Upgrade Rails 6.1 > 7.0, add turbo-rails and importmap, gems do not install
I'm trying to upgrade a working legacy app to Rails 7, from Rails 6.1. I want to use Hotwire, so I added gem turbo-rails.
Ruby 3.1.2
zeitwerk
no webpacker
sprockets-rails
no modern JS yet
app passes ...
0
votes
1
answer
424
views
In Rails 7, using turbo_stream to move an element from one div to another
I don't know if there's something wrong in my code, logic, or some limitation with turbo.
I have 4 columns of divs with id="period_x" where x is the period number.
Under each are scheduled ...
0
votes
0
answers
752
views
How to use turbo stream to replace just a single line html on form submission without using partial
I am new to Rails 7 with not much experience with turbo-stream, stimulus:
I have elements listed in <table> where last column has a form that just contains a checkbox.
I want to submit the form ...
4
votes
2
answers
342
views
Rails 7: unpermitted authenticity token
I found a bug in a feature someone else made in a project I was hired to help with. The programmer who did this is unavailable, and I found nothing on the internet about this error, so I'm hoping ...
0
votes
1
answer
2k
views
Turbo stream append works but does not change web page. defaultPrevented is true on it's own on frame element
I'm following the original tutorial of turbo at https://hotwired.dev/
and I got to the point of 5:30, and when he added turbo like this:
div to update
<div class="messages">
<%= ...
14
votes
3
answers
11k
views
Getting a Turbo Frame Error of "Content Missing"
I'm trying to use turbo_frame_tag in my Rails application to manage some tasks. I created a scaffold for my tasks.
I wrapped the page I want to use inside of a turbo frame tag as below:
<%= ...
0
votes
1
answer
508
views
Undefined local variable or method "rendering_options" error for
I am a beginner and I have used this fix (https://medium.com/@nejdetkadir/how-to-use-devise-gem-with-ruby-on-rails-7-33b89f9a9c13) for making devise work with turbo forms in my previous project and it ...
0
votes
1
answer
1k
views
Ruby on Rails 7 + Turbo - Not showing notice message
I am learning Ruby on Rails. Rails 7 + Turbo stream... I am following a tutorial and I am having a problem with displaying the Notice message.
Can you help me understand why I am not getting notice ...
1
vote
0
answers
626
views
Ruby on Rails 7 - page loaded twice when use 'data-turbo-track': 'reload' on it
I use rails 7 with importmap. On view I added
<% content_for :head do %>
<%= javascript_include_tag 'path/to/script', 'data-turbo-track': 'reload' %>
<% end %>
for run script only ...
2
votes
1
answer
1k
views
How do I make my .js.erb files work in rails 7
I'm following a Rails Tutorial | Building a Link Shortener with Rails 6 and ruby 2.xx to build the same app. However, I'm using rails 7.0.4 and ruby 3.0.0.
My create.js.erb file does not work. And ...