Questions tagged [turbo]
201 questions
0
votes
1 answer
Rails 7 - CurrentAttributes undefined
Can someone explain me why:
after_commit :send_partial_
def send_partial_
broadcast_update_to( ... locals:users_in_room_list )
end
def users_in_room_list
user = User.find_by(id:Current.user.id) // return undefined method `id' for…

Wordica
- 2,427
- 3
- 31
- 51
0
votes
0 answers
Can I automatically upgrade some ActionCable requests to websockets?
I'm developing a Rails 7 app, with some ActionCable elements, deployed for development and small-scale production to fly.io.
In most places, client browsers request /cable and are succesfully upgraded to websocket connections (101 Switching…

tom_c
- 1
- 1
0
votes
0 answers
Rail 7 - host - no image - development - activestorage - turbo
I use broadcast_update_to in rake task. When I use task from console
rake my:task:start
images are displayed and URL is like…

Wordica
- 2,427
- 3
- 31
- 51
0
votes
0 answers
Rails 7 - Turbo Stream for live data
i am using turbo_stream for live data, whenever some change has happened , it should reflect the UI which is opened in another browser without refreshing the page
shared/_table_details.html.erb
<%= turbo_stream_from "badge#{order.id}" %>
<%=…

uma
- 29
- 7
0
votes
0 answers
Links can not find js function in Rails 7
I have the following code in my view.
Alert a
Alert p
My p tag works, but not the link which errors…
Vantalk
- 367
- 2
- 5
- 21
0
votes
0 answers
build failed because task.source(...).swc is not a function
I am trying to implement the next js e-commerce template but gettin gthis error while using the command 'pnpm build'.
the error
nte-691-vm@nte-691-vm:~/Videos/company_project/cranberry-muffin/frontend$ pnpm build
> commerce@ build…
0
votes
0 answers
How to preserve events attached to persistent DOM elements between page navigation?
I'm using Symfony 6.2 with Turbo UX and Stimulus. I'm trying to code a single page app. In the /symfony-app/assets/app.js, I load some libraries that are needed for a Symfony Bundle to work before doing import './bootstrap'; to load…

thorstorm
- 153
- 3
- 10
0
votes
0 answers
Error with after_destroy_commit using broadcast_replace_later_to with Turbo Streams
iv been tryna implement turbo streams with friend request system and i have the following code in place:
# models/friend_request.rb
after_create_commit do
broadcast_friend_request_form_replace
end
after_destroy_commit do
…

Adrian-y
- 1
- 2
0
votes
0 answers
Scrolled page after clicking link with 'data-turbo-frame' set to '_top' in nested turbo frames
I've nested turbo frames as follows:
<%= turbo_frame_tag("main_container") do %>
...
<%= turbo_frame_tag("nested_container", src: "/path/to/articles", loading: "lazy") do %>
<%
# Here is the turbo-rendered content that will be…

Backo
- 18,291
- 27
- 103
- 170
0
votes
1 answer
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
def create
@message =…
merof
- 121
- 7
0
votes
0 answers
Rails Turbo: Broadcast To specific connection
We are facing a scenario where we want to ensure that the identified connections can view the newly created resource before we broadcast it to each connection within Action Cable. After reading some documentation, it appeared possible to broadcast…

Bitwise
- 8,021
- 22
- 70
- 161
0
votes
0 answers
Turbo frame is (redirecting?) loading ONLY the frame (ONLY)
so I've been following this tutorial
I have a problem with only the turbo frame loading
My page has a form, that is auto submitted by stimulus controller, and then loads only the frame.
it should remain on page http://localhost:3000/players/
but…

merof
- 121
- 7
0
votes
0 answers
Broadcasting to multiple streams and rendering a different partial/template with Rail's Turbo
im building a facebook clone app with rails and im using Turbo Streams to broadcast live changes to users subscribed to the streams. My problem is that when a user is on the show page of a post and they edit the post and submit the changes, the…

Adrian-y
- 1
- 2
0
votes
0 answers
Active Storage failed ot load resource the server responded with error 400 Rails 7
As I navigate to my page where a video element is located inside of a Turbo Frame, sometimes the video doesn't load at first. I just noticed in the console that I'm getting error 400 with the video url from Google Cloud Storage.
However, if I do a…

Patrick Vellia
- 399
- 2
- 9
0
votes
0 answers
Turbo-frame not adding task in same format
Turbo will add this task the following way to my tasks-table
Test
Test
2023-03-09
Low
…

A-laz
- 55
- 6