Questions tagged [turbo-rails]

67 questions
2
votes
2 answers

Turbo-Rails: How can I add add a Turbo Frame to `application.html.erb`?

I ran the following in the command line: > rails new test-turbo > rails g controller Home index Added the following route to config/routes.rb: resources :home, only: [:index] Wrapped the <%= yield %> in app/views/layouts/application.html.erb in a…
a-lavis
  • 33
  • 4
2
votes
1 answer

Turbo-rails not functioning in production

My app: ruby 3.1.2 rails 7.0.4 importmap-rails 1.1.5 turbo-rails 1.4.0 In development, everything behaves as expected, but in production (Ubuntu 22.04) NOTHING turbo-related seems to work: Links always trigger a complete page reload turbo-confirm…
Giuseppe
  • 5,188
  • 4
  • 40
  • 37
2
votes
0 answers

Mixpanel with Turbo Rails

I'm getting the following error while trying to use the Turbo Rails link: Mixpanel error: The Mixpanel library has already been downloaded at least once. Ensure that the Mixpanel code snippet only appears once on the page (and is not double-loaded…
Maya Paluy
  • 93
  • 7
2
votes
1 answer

Multiple Partial Updates in Rails using Turbo Stream

I have two models, one for customer and one for complaints, one customer also has many complaints. If a complaint is added to the customer, how can you use Turbo Stream to update both the index of complaints and the show view of the customer using…
doer123456789
  • 369
  • 1
  • 7
  • 22
2
votes
1 answer

Rails 7 + Devise + Turbo stream not showing errors when sign in

I started new project and am stuck for hours trying to make Sign In page show errors. Though when I try to write incorrect data on Sign up page it returns errors, Sign in completely ignores it. I found decision concerning devise for rails 7 from…
Anastasiia
  • 31
  • 2
2
votes
0 answers

Action Text [Rails 7 Error] vanishing field

Trying to isolate an error I'm getting with the basic setup of a new blog site using the below just so I can test Action_Text for the create blog section. Every-time i create the below- it works great until i change the <%= form.text_area :content…
Karl
  • 21
  • 3
1
vote
1 answer

Upgrade Rails 6.1 > 7.0, add turbo-rails and importmap, gems do not install

I'm trying to upgrade a working legacy app to Rails 7, from Rails 6.1. I want to use Hotwire, so I added gem turbo-rails. Ruby 3.1.2 zeitwerk no webpacker sprockets-rails no modern JS yet app passes tests server boots locally Added gem…
1
vote
0 answers

Rails hangs on Turbo::StreamsChannel is streaming from

My rails 7 application is using turbo streams broadcast. But after running for a while it will start hanging/not loading anymore. These are the last 3 lines from my application log I, [2023-07-20T15:48:46.854914 #4211] INFO -- :…
cccvandermeer
  • 317
  • 2
  • 14
1
vote
0 answers

Testing Action Mailer Count in Rails 7 with Hotwire and Turbo Stream (Sytem test case using capybara)

When using Rails 7 with Hotwire and Turbo Streams, and not utilizing Rails UJS, we encounter an issue when creating system test cases for an action that includes a button with data-turbo: true and turbo-method attributes, combined with HTTP verbs.…
1
vote
1 answer

Rails Turbo: Redirecting Back After Destroy Loses Flash

I have a Document, and Document has many Pages. On the Document show, you can click a button to delete the page. That button looks like: = link_to 'Delete', [:super_user, page], data: { turbo_confirm: 'Are you sure?', turbo_method: :delete } This…
Petercopter
  • 1,218
  • 11
  • 16
1
vote
1 answer

Template Error: missing partial bar/foo/_new

I want to display a root page which shows a turbo frame with a form for creating a new object. However the routing doesn't work as I want, because I get the above mentioned error. routes.rb namespace :cust do resources :customer_dates, only:…
perissf
  • 15,979
  • 14
  • 80
  • 117
1
vote
1 answer

How do I make my .js.erb files work in rails 7

I'm following a Rails Tutorial | Building a Link Shortener with Rails 6 and ruby 2.xx to build the same app. However, I'm using rails 7.0.4 and ruby 3.0.0. My create.js.erb file does not work. And from a quick lookup on google, I discovered .js.erb…
simper
  • 19
  • 9
1
vote
1 answer

Rails 7 + Hotwire/Turbo: Is it possible to specify the location of a turbo_stream.erb template?

Scenario Take for example the following code: class AwesomeController < ApplicationController ... def update respond_to do |format| format.html format.turbo_stream end end ... end As I understand it, the…
John
  • 9,254
  • 12
  • 54
  • 75
1
vote
0 answers

Turbo-rails keeps CSS loaded from the previous page

I'm using turbo-rails 1.1.1 with Rails 7. I have two pages: first includes Tailwind css, second uses Bootstrap: When the…
Evgenii
  • 36,389
  • 27
  • 134
  • 170
1
vote
0 answers

Access current_user / current_account context in a Rails Turbo Stream partial?

So in my app I have the user and account info in the stream: web | [ActionCable] [User 8] [Account 3] Turbo::StreamsChannel transmitting... Set here: module ApplicationCable class Connection < ActionCable::Connection::Base include…
Dan Tappin
  • 2,692
  • 3
  • 37
  • 77