Questions tagged [turbo]

201 questions
0
votes
0 answers

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 already existing asset pipeline with…
hybridspyda
  • 21
  • 1
  • 4
0
votes
0 answers
0
votes
0 answers

turborepo package has no update or ts namespace no work

a turborepo projexc: apps web packages api types common intex.tsx in my api/types, I add 'match' interface api/types/index.ts declare namespace API { export interface Item {...} export interface Match {...} } in common/index.tsx…
Andersen
  • 1
  • 1
0
votes
1 answer

Trying to understrand how Turbo works in Ruby on Rails

I created a small example in Ruby on Rails trying to understand how Turbo works in Ruby on Rails, this is what I did: This is the index.html.erb, the idea here is to have a form with the list of posts created below

<%= notice…

FerCib
  • 3
  • 1
0
votes
0 answers

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 and remove product from order items. In between…
0
votes
0 answers

Rails 7 turbo stream dynamic table won't get parent table style

Following a GoRails episode Using Rails 7.0.4.3 and Bootstrap 5, I created a turbo_frame dynamic table that adds rows when required to create a document (Quotation with different services to quote) It works fine, BUT the parent table style is not…
Luis Flores
  • 91
  • 3
  • 14
0
votes
1 answer

Need help understanding turbo in rails 7

Everything all around is just acting weird. I can create todo objects but they are only displayed after I refresh, I have had this same issue on 2 separate occasions. I know that I am using the variables wrong but with so much going on it's hard for…
gage
  • 1
0
votes
0 answers

The change is gone in editing page when remove pictures wuth turbo_frame

I made some change in edit page and then remove some pictures without refreshing page since turbo_frame, and if I click "update" the page refresh and the change in text are gone, it only actually update if I click for second time. For example, the…
0
votes
0 answers

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 where last column has a form that just contains a checkbox. I want to submit the form on checkbox change, push an alert after submission.…
0
votes
1 answer

Run custom Javascript when turbo stream is received

I have a Rails app where I just added Turbo Streams to update a list of items in real time. I followed this guide to do it: https://www.hotrails.dev/turbo-rails/ It works really well, except for one thing: Each item in the list has buttons to "Edit"…
Christoffer Reijer
  • 1,925
  • 2
  • 21
  • 40
0
votes
0 answers

How to fix the "Content missing" error in turbo frame?

By default, the new.html.erb needs to show the content of public question partial. When clicking on the buttons, the button needs to show its associated contents dynamically (public question partial for public question button and private question…
0
votes
1 answer

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: model, url: sample_p_url, method: :put) do |f| %> #other fields…
aldrien.h
  • 3,437
  • 2
  • 30
  • 52
0
votes
1 answer

How to override `turbo_frame_tag` method?

I'm using Ruby on Rails 7 with the Turbo Rails gem, which provides the turbo_frame_tag method. I would like to add default html data attributes to all the tags that are generated through turbo_frame_tag. That is, given the default data…
Backo
  • 18,291
  • 27
  • 103
  • 170
0
votes
0 answers

Can't get Rails 7 turbo_stream_from to update view from broadcast

I've been trying to get turbo_stream_from working, without any luck. Something seems to be broadcasting, but it doesn't update the view, nor do I see any logs like "Turbo::StreamsChannel is transmitting" from my rails server. # show.html.erb <%=…
Gantrof
  • 31
  • 9
0
votes
1 answer

Colormap with different color transition

I am using the colormap "turbo" in MATLAB. The transition of color is red--orange--yellow--green--light blue--dark blue. Can I create a similar colormap with a different color transition? For example: green--blue--purple--red--orange--yellow. Is…
Aurora7979
  • 13
  • 4