Questions tagged [turbo]

201 questions
1
vote
0 answers

In Rails 7 with Turbo, broadcast_prepend_later_to is working, but too fast for page redirect

I have a Rails 7 application with a "Workout" form. Once I submit the form, I have two callbacks that execute. The first is the after commit on the Workout model. This finds/updates or creates a WorkoutSummary record. The second is the after…
daveomcd
  • 6,367
  • 14
  • 83
  • 137
1
vote
1 answer

How to update (nodejs14.x) while having node version v16.14.2?

I am beginner in node trying to create rest-api's using node and express. Following the udemy course https://www.udemy.com/course/create-a-rest-api-with-node-js-and-mongo-db/. In this turbo server is used and site is deployed on that. Now I want to…
Sid
  • 2,792
  • 9
  • 55
  • 111
1
vote
1 answer

Why doesn't the turbo_frame_tags content of Rails Turbo appear in the webpage?

I'm following Hotwire's official instructable(https://hotwired.dev/#screencast), trying to test Rails Turbo's sorting functionality. However, I found that some content wrapped by turbo_frame_tag will not be displayed in the page this is in…
Ckt22
  • 181
  • 1
  • 1
  • 9
1
vote
0 answers

turbo stream filter frame fails

To my knowledge I'm passing the variable through, however it keeps throwing an error of undefined, digging further it has no :id. However the search query does work via a console check and pulls the correct :id's. _routine_list: <%= turbo_frame_tag…
Chrismisballs
  • 167
  • 12
1
vote
1 answer

How to clear form after submission in rails using (stimulus) hotwire?

I have a form which creates a new post, and a stimulus controller that clears the input fields after submission. However, it does this before the input values reach my rails controller. This is my form_controller.js import { Controller } from…
def avi
  • 506
  • 6
  • 10
1
vote
3 answers

Rails active link styling with turbo frames

I have links made like this: - @glossaries.each do |g| %a.{ :href => glossary_path(g), data: { 'turbo_frame': :'entry' } } = g.title How can I style active link (active glossary) if result of clicking g.title link is rendered in another…
1
vote
1 answer

setting a fade to turbo_stream

Rails UJS has a compactness about it. In a single line of a js.erb file, one calls the dom_id, a partial AND gives it some interaction (that confirms the change in the object with a minimalist approach). Example with jQuery library…
Jerome
  • 5,583
  • 3
  • 33
  • 76
1
vote
1 answer

Link "data-turbo-frame" attribute removed when rendering

I'm using Stimulus and ActionText to handle 'mentions', following the tutorial below; User @mentions with ActionText When displaying the actiontext content, the partial for each 'mention' is rendered from a json.builder file. The issue that I'm…
1
vote
0 answers

Why's is format.turbo_stream causing the page to jump to the top?

I have a table that makes up a very complex schedule. Each tr has a unique dom id. As the schedule is rendered, the duration of a schedule's time span dictates a colspan attribute. For example, a 9 day schedule span will colspan 9 tds and look…
hellion
  • 4,602
  • 6
  • 38
  • 77
1
vote
0 answers

Rails + Hotwire: Turbo does not trigger on links that change the subdomain

According to the documentation: By default, Turbo Drive only loads URLs with the same origin—i.e. the same protocol, domain name, and port—as the current document. A visit to any other URL falls back to a full page load. However I would like to…
hananamar
  • 1,166
  • 15
  • 25
1
vote
1 answer

Passing the User ID between an iOS app and Rails backend for In-App Purchases

I've got a Turbo-enabled Rails app and a Turbo Native iOS app. On the web app, you can purchase subscriptions via Stripe, and so I need to enable the iOS app users the ability to purchase within the app. So far, I've got the following set up: When…
Noddy
  • 11
  • 1
  • 2
1
vote
1 answer

How to access current_user helper with Hotwire & Turbo.js?

I’m following this tutorial to implement a feature where user can submit Trivia/Interesting Facts. I want to restrict (edit/delete) functionality to the admin or author of each item.

 I’ve created a helper class in .application_controller def…
tommers
  • 51
  • 7
0
votes
1 answer

tubo nextjs vscode breakpoints not hitting for server

Turbo nextjs breakpoints not being hit when I run the debug configuration in the nextjs documenation.
0
votes
0 answers

How to setup lint-staged with turbo monorepo?

I have a turbo monorepo, with packages/... and apps/app-a, apps/app-b . I have set up husky pre-commit hook, which will run pnpm dlx lint-staged I want lint-staged to run lint script from the closest to the staged file package.json file. So for…
Nez Nez
  • 33
  • 5
0
votes
0 answers

Jest & Config Issue: SyntaxError Cannot use import statement outside a module

I am trying to setup Jest for testing in my NextJS application on a monorepo. I followed the guide on the official NextJS doc that uses the Rest Compiler, then I configured babel, but for some reason when I try to run a pnpm test I get an issues…