Questions tagged [turbolinks]

Turbolinks makes following links in your web application faster. Instead of letting the browser recompile the JavaScript and CSS between each page change, it keeps the current page instance alive and replaces only the body and the title in the head.

Filter by
Sorted by
Tagged with
0 votes
0 answers
55 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,892
0 votes
1 answer
30 views

Rails Form won't submit after redirecting from another page

This is a weird one and I believe it has something to do with how Turbo works. So I have an update form on one of my screens that looks something like this: <%= form_with model: @user, url: ...
crodev's user avatar
  • 1,373
0 votes
1 answer
48 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,177
1 vote
0 answers
139 views

Turbo Rails not working in production environment

I have successfully deployed my first Rails app on production mode to a Digital Ocean Droplet. I have developed the app in my local computer with some Turbo Frames working correctly, but in production ...
Fernando Schlosser's user avatar
0 votes
1 answer
59 views

Livewire Turbolink Site jumped twice when navigate

I have used Laravel 10 with Livewire 3 and Turbolink. When I navigate site from one page to another page, page jumps twice. I am getting below two error message in console. Detected multiple instances ...
JatinBhattPhp's user avatar
0 votes
0 answers
61 views

When use 'data-turbolinks-track' page rendered twice (double rendering)

Synopsis application.html.erb: <head> ... <% if content_for?(:head) %> <%= yield :head %> <% end %> </head> ... View: <% content_for :head do %> <%= ...
infernal's user avatar
0 votes
0 answers
36 views

ruby POS system. AJAX Adding an item executes twice

I'm kinda still new to web development and just started working on a POS system as a fun little project. I'm struggling really hard with my items page, I basically need all crud to be done on one page ...
Mike Barrett's user avatar
0 votes
0 answers
14 views

Play Background Audio using Turbo Native Android

I'm developing an app for a radio station using Turbo from a website also using Turbo but I'm experiencing a problem with background audio streaming. When the screen is turned off or the user uses ...
Erick Filho's user avatar
  • 1,962
0 votes
1 answer
107 views

Hotwire Turbo in WordPress

I wish to use Hotwire Turbo in my WP app. I'm including it like so: wp_enqueue_script('Turbo', 'https://unpkg.com/@hotwired/[email protected]/dist/turbo.es2017-esm.js', array(), '7.3.0', false); The above ...
rctneil's user avatar
  • 7,028
0 votes
0 answers
54 views

Rails upgrade from Turbolinks to Turbo

I'm trying to upgrade my Rails app (v6.1.7.4) from Turbolinks to Turbo. I use sprockets (4.2.0). I've gone through a path of including importmap.json to my config folder and trying to utilise my ...
hybridspyda's user avatar
0 votes
0 answers
8 views

Jquery-Datatables re-initializing on restroration visits

I am using rails 6 app which has turbolinks enabled. I have used jquery-data table on several pages. My issue is when I try to use browser' back and forth buttons, turbolinks performs restoration ...
Muhammad Ans's user avatar
0 votes
0 answers
19 views

Embedded JavaScript app disappears after coming back to page

The Problem: When I reload a page with an embedded Svelte app, the app loads fine. If I follow links to other parts of the Rails app but then come back to the page that has my app in it, the app is ...
aarona's user avatar
  • 36.3k
0 votes
0 answers
176 views

turbo frame tag for order_item quantity update rendering text on submission

I am trying to build a frame_tag where only the order quantity will be updated when the add/remove order item button is clicked. I am building a menu system and I have the add product to order items ...
Luke Littler's user avatar
0 votes
1 answer
404 views

How to submit a form without reloading turbo_frame_tag

Using tubro_frame in Rails, how to submit a form which is inside the turbo frame without reloading it? Sample code: <%= turbo_frame_tag "sample-frame" do %> <%= form_with(model: ...
aldrien.h's user avatar
  • 3,517
1 vote
1 answer
65 views

Turbolinks in rails

Recently I have been reading about turbolinks which is deprecated but one should have a proper knowledge . I have read that turbolinks replaces the body of the requested page with the body of the ...
Muhammad Ans's user avatar
0 votes
0 answers
133 views

Turbo Frame always targeting _top

I have a turbo frame within a rails app: <%= turbo_frame_tag :foo, :src => foo_path %> and inside this frame is a some simple html: <%= turbo_frame_tag :foo do %> <a href="...
Neil Middleton's user avatar
0 votes
1 answer
136 views

GA4 Implementation alongside Turbolinks (duplicate page_view)

Running on Rails 5.2.6 - Turbolinks 5.1.1 - i'm embedding GA4 Google Tag to the site using the following code <script async src="https://www.googletagmanager.com/gtag/js?id=XXXX"></...
Bryan Spence's user avatar
0 votes
0 answers
62 views

turbolinks:load eventlistener in rails 7 partial not executing

I have a partial with some radio buttons and a submit button. <div class="row align-items-center h-100"> <div class="col-md-6 mx-auto"> <form&...
Robert Tan's user avatar
0 votes
0 answers
27 views

Rails turbo_stream not updating value

I am new to turbostreams. In a Rails App i have profile and partners model 1:n profile/show.html.erb <%= turbo_frame_tag :profile_frame do %> <%= render @profile %> <% end %> <...
Werner's user avatar
  • 169
0 votes
1 answer
87 views

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:...
Wordica's user avatar
  • 2,457
1 vote
1 answer
113 views

Rails 7 - CurrentAttributes - Unsupported argument type

My pseudo class Current class Current < ActiveSupport::CurrentAttributes attribute :user end My ApplicationController: class ApplicationController < ActionController::Base ...
Wordica's user avatar
  • 2,457
1 vote
2 answers
49 views

How can I prevent a turbo destroy link from being clicked twice?

Given a link_to with a turbo_method: :destroy how I can prevent it from being quickly double clicked? <%= link_to "X", items_path(@item), data: {turbo_frame: "frame",...
Justin Tanner's user avatar
0 votes
1 answer
279 views

Understanding how to use Turbo with Ruby on Rails

I am trying to understand how to use Turbo in order to refresh the content of the page without having to refresh the page. I have gone through some videos and web tutorials, but it doesn't apply to ...
djFuz's user avatar
  • 23
2 votes
1 answer
371 views

Rails 7 portfolio webpage seemingly wont load application.js unless reloaded

I took my first step into creating a website with my own two hands to much of my peril (being so new). That being said, I know I'm sloppy so please correct EVERY SINGLE DETAIL you can so I can learn :)...
Jack Gio Packham's user avatar
0 votes
0 answers
250 views

ActionView::MissingTemplate (Missing partial....) issue on turbo rails

I have set all codes in controllers, routes and views in my rails app that need to make like/dislike by user for reviews. It is working clearly. issue is refreshing the page. Then I asked on forums ...
mihraç cerrahoğlu's user avatar
0 votes
1 answer
96 views

Struggling with Turbolinks and CSP to render a partial

I am using Rails 6.1.7 with turbolinks and CSP nonce based. Here is my CSP config : policy.default_src :self, :https policy.font_src :self, :https, :data policy.img_src :self, :...
Maryline Rs's user avatar
0 votes
0 answers
263 views

flowbite script not work after hotwireturbo in laravel livewire

i'm using livewire 2x and want a single a page application and also using flowbite for desing purpose. i pluged in turbolinks . befor it flowbite working fine but whenever i import hotwireturbo ...
Muhammad Irfan's user avatar
0 votes
0 answers
645 views

Loading Script in Rails 7 Turbo Event

I was trying to add this script into the page. <script> ( function(d){ var s = d.createElement("script"); s.setAttribute("data-account", "azj4WdAV8Nq"); ...
Santosh Aryal's user avatar
1 vote
1 answer
523 views

Hotwire turbo with turbo-method: :delete and redirect_to

My test erb: <%= link_to 'Test', test_path, data: { turbo_method: :delete } %> My test controller method looks like this: def test redirect_to root_path, status: :see_other end Simple as that....
Oliver's user avatar
  • 821
2 votes
0 answers
296 views

Whole page reloads when navigating using Turbo in Rails application

I recently began working on a documentation site using Ruby on Rails and Turbo (repository is here, and the website is here), and I'm having a slight issue with navigation. When I press the links in ...
George B's user avatar
  • 928
0 votes
1 answer
209 views

Turbo frame causes unexpected page layout

I currently used turbo-frame in a project which was using turbo-links, after I found that all the pages are disrupted by turbo-frames, such as the dropdown list became something looks like a input ...
abcXYZ's user avatar
  • 119
3 votes
1 answer
1k views

Turbo Stream link_to strips out custom attributes in GET request

I'm using Rails 7. I wanted to create a link using link_to that inserts some custom form fields for a many-to-many relation into a form via a hotwired frame elsewhere on the page. In order to ...
Lars Westergren's user avatar
0 votes
0 answers
323 views

Symfony UX Turbo Autocomplete - Error with autocomplete options on EntityType

I'm currently testing Symfony UX Turbo and I have a problem with the autocomplete component. Indeed, when I add, as the doc says, an 'autocomplete' option in my form addition, I get the following ...
MaxPtdr's user avatar
  • 13
0 votes
1 answer
454 views

Javascript doesn't run on back button or menu item click in my rails application

I have the following Javascript code contained in my profile.js file in Rails 7: window.addEventListener('load', function () { updateProfile(); }) window.onpageshow = function(event) { if (event....
James's user avatar
  • 147
0 votes
1 answer
915 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 ...
Volkan's user avatar
  • 506
1 vote
0 answers
130 views

Using Turbo in Ruby on Rails app that was updated from 5.2 to 7

recently I updated the legacy Ruby on Rails application from version 5.2 to 7.0. I want to use Ruby on Rails 7.0 features like Turbo etc. Can I use turbo-rails gem with sprockets Asset Pipeline? I'm ...
Mateusz Urbański's user avatar
1 vote
2 answers
427 views

Bootstrap 5 follow link URL with Modal toggle

I'm trying to get a Modal with Bootstrap 5 to open the modal from a link, and then dynamically load the content (body of the modal) by sending the request onto the server which will then return the ...
MarkC's user avatar
  • 81
0 votes
1 answer
269 views

Rails wait for Turbolinks to be loaded to execute JavaScript import

Ich want to call a JavaScript function within the application.html.erb. The function is imported and provided in the application.js: import myFunction from 'myJSModule'; window.myFunction = myFunction;...
WnaJ's user avatar
  • 78
0 votes
1 answer
97 views

Can Hotwire be implemented on Rails app that already has Angular front end?

I have a RoR app with Angular and I want to make a mobile app of it. I have been searching and it seems Hotwire Turbo might be a good option for a few reasons. In order to use Hotwire in my current ...
kleiguen's user avatar
2 votes
0 answers
328 views

Omines Datatables with Turbo and Stimulus

I am trying to use Turbo in a new Symfony development. I'm following Turbo: Drive, Frames & Streams as a reference! and previously Symfony UX: Stimulus. Both topics are new to me and as if that ...
Martin's user avatar
  • 53
0 votes
1 answer
467 views

Disable Turbolinks for will_paginate (Rails 7)

Need to disable Turbolinks for the pagination buttons. Simply adding data: { turbo: false } does not seem to work. <% will_paginate data: { turbo: false } %>
greenMaven's user avatar
0 votes
1 answer
57 views

Turbolinks and Ruby Shopify_app 20.1

My shopify app uses shopify_app 19 and turbolinks to load the code into the embedded app: Turbolinks.visit(data.loadPath); Until today, I just needed to add the session value in the header: xhr....
aarkerio's user avatar
  • 2,223
1 vote
0 answers
264 views

Turbo Laravel package fully reloads the page when "return redirect" is used

I have been developing a Laravel 9 application with Livewire and using Turbo Laravel package for give it a SPA feeling. It works fine with regular links, but there is a register page in my application ...
pasindu's user avatar
  • 559
0 votes
1 answer
65 views

Rails 7 how to open table inside a row of another table

In my Rails 7 (with bootstrap) app I need to create a table with all users transaction that has on each row an arrow that when clicked on, expands that row inside which is a new table (that's what I ...
mr_muscle's user avatar
  • 2,654
0 votes
2 answers
694 views

My Jquery files are only loading on Refresh page rails 7

My Jquery files are only loading when page is refreshed. But when I remove (import "@hotwired/turbo-rails") from application.js It works normally. But removing "@hotwired/turbo-rails&...
Hammad Abdullah's user avatar
1 vote
1 answer
884 views

How to trigger "Leave Site?" message for single page – Turbo & Stimulus JS

I want to trigger the in-browser message of "Leave Site?" before leaving a specific form on my site (exactly how StackOverflow does it). The form is at /posts/new (or /posts/xxx/edit). ...
Kobius's user avatar
  • 694
0 votes
3 answers
884 views

Rails js script code not working while screen back due to Turbolinks

In my rails app there is a JS script in partial view const f2s = window.document.createElement("script"); f2s.defer = true; (f2s.src = "https://face2.oktium.com/face2widget.js&...
Haseeb Ahmad's user avatar
  • 8,166
2 votes
4 answers
3k views

Rails 7 redirect error: An import map is added after module script load was triggered

I have a Rails 7 app. One of my controller actions (logout action), redirects the user to the root_url. For some reason, upon redirect, I see following error on Chrome's console and the one button (...
septerr's user avatar
  • 6,455
1 vote
1 answer
536 views

Laravel Livewire Turbolinks with Image lazyload

I am trying to build a website on Laravel Livewire with Vanilla Lazyload and Turbolink. On refreshing the page, image on page is lazyloaded, but soon I click on link, image do not lazy load until I ...
Shshank's user avatar
  • 27
1 vote
0 answers
566 views

Can multiple models use the same turbo_stream_from tag?

For applications with multiple turbo_stream_from tags like so: <%= turbo_stream_from "posts" %> <div id="posts">...</div> <%= turbo_stream_from "comments&...
Justin Tanner's user avatar

1
2 3 4 5
20