From e825f1d33f8ba89cb8749a45d42c4e75f4c8fd88 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 5 Apr 2025 16:06:44 +0200 Subject: [PATCH] No need for the partial indirection --- app/controllers/bubbles/assignments_controller.rb | 1 - .../{_assignment.html.erb => assignments/new.html.erb} | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) rename app/views/bubbles/{_assignment.html.erb => assignments/new.html.erb} (67%) diff --git a/app/controllers/bubbles/assignments_controller.rb b/app/controllers/bubbles/assignments_controller.rb index f7cada259..cb8e0d677 100644 --- a/app/controllers/bubbles/assignments_controller.rb +++ b/app/controllers/bubbles/assignments_controller.rb @@ -2,7 +2,6 @@ class Bubbles::AssignmentsController < ApplicationController include BubbleScoped def new - render partial: "bubbles/assignment", locals: { bubble: @bubble } end def create diff --git a/app/views/bubbles/_assignment.html.erb b/app/views/bubbles/assignments/new.html.erb similarity index 67% rename from app/views/bubbles/_assignment.html.erb rename to app/views/bubbles/assignments/new.html.erb index d28298c02..992c0b3c4 100644 --- a/app/views/bubbles/_assignment.html.erb +++ b/app/views/bubbles/assignments/new.html.erb @@ -1,13 +1,13 @@ -<% cache [ bubble, bubble.bucket ] do %> - <%= turbo_frame_tag bubble, :assignment do %> +<% cache [ @bubble ] do %> + <%= turbo_frame_tag @bubble, :assignment do %> Assign this to… - <%= form_with url: bubble_assignments_path(bubble), class: "flex flex-column full-width popup__list", data: { controller: "form" } do |form| %> - <% bubble.bucket.users.active.sort_by(&:name).each do |user| %> + <%= form_with url: bubble_assignments_path(@bubble), class: "flex flex-column full-width popup__list", data: { controller: "form" } do |form| %> + <% @bubble.bucket.users.active.sort_by(&:name).each do |user| %>