From 9b52dd1b52488b444300f418a8286cfe182c8aad Mon Sep 17 00:00:00 2001 From: Jeffrey Hardy Date: Wed, 18 Sep 2024 15:24:09 -0400 Subject: [PATCH] Eliminate boosts#index async loading in favor of inlining --- app/controllers/boosts_controller.rb | 3 --- app/views/boosts/index.html.erb | 3 --- app/views/bubbles/_boosts.html.erb | 5 ++++- 3 files changed, 4 insertions(+), 7 deletions(-) delete mode 100644 app/views/boosts/index.html.erb diff --git a/app/controllers/boosts_controller.rb b/app/controllers/boosts_controller.rb index 63304ebe2..5cd02388f 100644 --- a/app/controllers/boosts_controller.rb +++ b/app/controllers/boosts_controller.rb @@ -1,9 +1,6 @@ class BoostsController < ApplicationController include BubbleScoped, ProjectScoped - def index - end - def create @bubble.boosts.create! end diff --git a/app/views/boosts/index.html.erb b/app/views/boosts/index.html.erb deleted file mode 100644 index 37e11e54f..000000000 --- a/app/views/boosts/index.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%= turbo_frame_tag dom_id(@bubble, :boosts) do %> - <%= render "boosts/boosts", bubble: @bubble %> -<% end %> diff --git a/app/views/bubbles/_boosts.html.erb b/app/views/bubbles/_boosts.html.erb index 8192becc0..dc176a3cc 100644 --- a/app/views/bubbles/_boosts.html.erb +++ b/app/views/bubbles/_boosts.html.erb @@ -4,5 +4,8 @@ animation_play_class: "boosting", toggle_class_toggle_class: "boosting", action: "animationend->toggle-class#toggle" } do %> - <%= turbo_frame_tag dom_id(bubble, :boosts), src: project_bubble_boosts_path(bubble.project, bubble) %> + + <%= turbo_frame_tag dom_id(bubble, :boosts) do %> + <%= render "boosts/boosts", bubble: bubble %> + <% end %> <% end %>