Questions tagged [turbo-rails]

67 questions
1
vote
2 answers

Rails turbo visit without change history state

I want to trigger a get request cycle without change in browser history. I have tried Turbo.visit(url, { action: "advance" }); Turbo.visit(url, { action: "replace" }); But both change history.
1
vote
1 answer

Turbo-rails distinct scoped partial broadcast update

I want to broadcast updates of ActiveRecord to distinct partials depending on their scoped route. How could I do that? Ex: I have a Post model that has_many :comments. Comments can be updated and we have two partials for a comment in the following…
user3805610
  • 252
  • 2
  • 13
1
vote
2 answers

rails turbo_stream is not working on a rails 7 application

I am trying to submit a form and return a turbo_stream on a rails 7.0 application. In my form I have the following. <%= form_with url: "/request_trial", method: :post, format: :turbo_stream do |form| %> <%= form.label :name,…
user17914516
  • 119
  • 3
  • 8
1
vote
1 answer

Rails 6 with turbo-rails. popper.js is not loading on full page load

I am very new to rails and webpacker and cannot figure out what is happening, here. When I perform a 'full load' of my app from the address bar in the browser, the tooltips and popovers are not being instantiated and I get errors like…
prufrock
  • 239
  • 1
  • 4
  • 15
0
votes
1 answer

Can't pass current_user into rails 7 turbo stream

I am trying to learn turbo with rails and have come to a problem that I can't seem to figure out. I have a structure where every Applicant has Messages. Two users can send messages to each other through an Applicant. This stream works now. However,…
0
votes
1 answer

In Rails 7, using turbo_stream to move an element from one div to another

I don't know if there's something wrong in my code, logic, or some limitation with turbo. I have 4 columns of divs with id="period_x" where x is the period number. Under each are scheduled courses defined by
Sana
  • 79
  • 1
  • 13
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
2 answers

Is it possible to use Turbo Streams with MongoDB in a Rails 7 application?

I am trying to create a reactive chat application with Rails 7 using MongoDB. I have three models that I'm working with: 1. Topic 2. TopicMessage 3. User For the MongoDB setup, it is required to use Mongoid and the models cannot inherit from…
0
votes
0 answers

Error with after_destroy_commit using broadcast_replace_later_to with Turbo Streams

iv been tryna implement turbo streams with friend request system and i have the following code in place: # models/friend_request.rb after_create_commit do broadcast_friend_request_form_replace end after_destroy_commit do …
Adrian-y
  • 1
  • 2
0
votes
1 answer

Turbo stream append works but does not change web page. defaultPrevented is true on it's own on frame element

I'm following the original tutorial of turbo at https://hotwired.dev/ and I got to the point of 5:30, and when he added turbo like this: div to update
<%= render @room.messages %>
def create @message =…
0
votes
0 answers

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 and checked threads in here then made something.…
0
votes
1 answer

Rails7+Devise+Captcha: undefined method `users_url' for #

Prereq: Rails 7.0.4 Devise 4.9.0 with hotwire/turbo support Responders 3.1.0 Devise has the default config with config.responder.error_status = :unprocessable_entity config.responder.redirect_status = :see_other lines in it. It works properly…
noff
  • 115
  • 1
  • 5
0
votes
1 answer

Render :edit not working as expected with turbo frame

I am developing a 2-step booking form using turbo-rails in order to use Ajax and update only the necessary page components. I am using 2 models, BookingDate and Booking. BookingDate contains the start and end DateTimes. Booking contains the…
perissf
  • 15,979
  • 14
  • 80
  • 117
0
votes
0 answers

Rails javascript_include_tag not loading react components

Before today, I haven't had any issues loading react components in my rails app. But for some reason, today everything started returning a blank screen whenever I viewed a react page. Non-react pages work fine and display correctly. I'm loading in…
Kyle Pendergast
  • 739
  • 1
  • 8
  • 17
0
votes
1 answer

How to detect when Turbo Stream broadcast is established?

In my Rails view I call turbo_stream_from view helper to establish turbo stream web socket connection: <%= turbo_stream_from :my_broadcast %> Is there a way for know when the web socket connection was established using JavaScript in the browser?…
Evgenii
  • 36,389
  • 27
  • 134
  • 170