Questions tagged [turbo]

201 questions
0
votes
1 answer

How to send_file() in response to form submission in Turbo-Flask python

I have a fairly simple Flask application that response to a form submission with a xlsx file after some processing. I've been trying to change the webapp to use Turbo-Flask, however due to the way Turbo-Flask changes how form submissions work, my…
Jed
  • 1
0
votes
2 answers

RoR Rails 7 using Turbo to Update a partial on button click

Help! I'm relatively new to Ruby on Rails and now I'm attempting to use Rails 7 with Turbo and Stimulus to update a partial on my web page. I have buttons on a page within a partial (call it _home.html.erb). When clicked I'd like them to replace…
epurdy
  • 151
  • 1
  • 12
0
votes
1 answer

How can I create a button which adds fields to a Rails form

I have a form in Rails which uses fields_for to accept nested attributes: <%= form_with(model: @combat_tracker, url: form_url) do |f| %> … <%= f.fields_for :zones do |zone| %>
<%= zone.text_field :name %> …
tsvallender
  • 2,615
  • 6
  • 32
  • 42
0
votes
1 answer

Turbo.remove() not working , while turbo.update still performed

i'm building an app with rails 7 and hotwire. I have a div with a invite message, when the invitation is declined, 2 actions should be triggered: I- Update my flash messages to display 'you declined the invitation' in my toaster (Working) II- Remove…
Sonfaya
  • 27
  • 6
0
votes
1 answer

Type error: Cannot find type definition file for '__mocks__'

This error began after switching to yarn workspaces and turbo for my set of nextjs projects. It seems to be related to jest, but I don't even have jest in any of my package.json files. I suspect it's related to a sub-dependency. I thought perhaps…
CodeManiak
  • 1,903
  • 4
  • 19
  • 32
0
votes
0 answers

Turbo performance benefit confusion, application teardown

I'm unsure about this last sentence in the first paragraph of the Turbo docs. A key attraction with traditional single-page applications, when compared with the old-school, separate-pages approach, is the speed of navigation. SPAs get a lot of that…
Jbur43
  • 1,284
  • 17
  • 38
0
votes
1 answer

Rails 7 + Turbo: turbo_stream respond with extra data on partial template?

Im playing around Rails 7 + Turbo and I'm trying to create a form which has a dropdown of user lists. The form could create a new "Unit" record and assign users to this unit. The plan create a dropdown where you can search and select the owner of…
J. Doe
  • 11
  • 4
0
votes
1 answer

Login flow with Hotwire

I'm currently developing my first application with Rails and Hotwire. It includes a comment form visible to all users. When unauthenticated users submit it, I'd like to open the login form (managed by Devise) in a modal on top of the form. Currently…
davidg
  • 651
  • 1
  • 7
  • 18
0
votes
2 answers

How do you use a turbo frame to replace an object creation form with an object show partial?

I have a model subscription_tier with show and edit actions with corresponding views. I've wrapped each of these with a turbo frame <%= turbo_frame_tag subscription_tier do %> When I edit an existing subscription tier and save it, the turbo frame…
sasav
  • 1
  • 1
  • 2
0
votes
1 answer

Can I use hotwired turbo.js offline?

I'm trying to use turbo-flask in my python flask application. It tries to download turbo.js but failes because I'm not working with an internet connection. I thought about inserting the js file directly into my project but couldnt find it…
ALeg
  • 3
  • 1
0
votes
0 answers

Rails console destroy action but is not percolated to the application and handling via turbo stream

A form contains a destroy button <%= button_to 'bomb', message, method: :delete, form: { data: { turbo_confirm: 'R U sure?' } } %> and the controller responds in an expected manner respond_to do |format| format.turbo_stream [logging:…
Jerome
  • 5,583
  • 3
  • 33
  • 76
0
votes
0 answers

Rails edit form update query error (turbo frames)

When I try to update a service and submit everything updates except the name that goes to the SQL query with the old value. The edit form: https://i.stack.imgur.com/YSZuD.png If I submit this I get this: ↳…
hugonuns
  • 11
  • 2
0
votes
1 answer

Hotwire Modal Form Not Rendering Flatpickr Correctly

I have a modal form that works fine to create a new Detail record via hotwire. Among the fields are flatpickr date field and two flatpickr time fields. If I have validation errors form renders with the errors showing inside the modal, but the…
spacerobot
  • 265
  • 1
  • 5
  • 23
0
votes
1 answer

How to send a broadcasts_to in Rails 6 (hotwire) only when a record with a specific name value is created or updated, and for a specific partial?

I have a Rails 6 View with three numerical integer indicators: speed, temperature and pressure. These values ​​are stored in SavedObject model as serialized objects. And in the controller are passed to the view with their respective instance…
lcchatter
  • 41
  • 2
  • 7
0
votes
1 answer

turbo drive works for a form but not a link

I an experimenting with turbo drive without rails. It seems to work for forms but not links.. even when the form is set to GET. To try to keep it minimal, I have used bash and cgi, but I saw the same thing using another web framework. $ mkdir…
Alex028502
  • 3,486
  • 2
  • 23
  • 50
1 2 3
13
14