Replace "editing" param with creating? state

This commit is contained in:
Kevin McConnell
2025-02-06 14:50:28 +00:00
parent b347d77f4d
commit 321384b573
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ class BubblesController < ApplicationController
def create
@bubble = @bucket.bubbles.create!
redirect_to bucket_bubble_path(@bubble.bucket, @bubble, editing: true)
redirect_to bucket_bubble_path(@bubble.bucket, @bubble)
end
def show
+1 -1
View File
@@ -8,7 +8,7 @@
<div>
<h1 class="bubble__title">
<% if local_assigns[:editing] %>
<% if bubble.creating? %>
<%= turbo_frame_tag bubble, :edit, src: edit_bucket_bubble_path(bubble.bucket, bubble) %>
<% else %>
<%= turbo_frame_tag bubble, :edit do %>
+1 -1
View File
@@ -80,7 +80,7 @@
<div class="bubble__container" data-controller="beacon" data-beacon-url-value="<%= bucket_bubble_readings_url(@bubble.bucket, @bubble) %>">
<div class="bubble__perma flex justify-center center">
<%= render "bubbles/bubble", bubble: @bubble, editing: params[:editing] %>
<%= render "bubbles/bubble", bubble: @bubble %>
</div>
+1 -1
View File
@@ -19,7 +19,7 @@ class BubblesControllerTest < ActionDispatch::IntegrationTest
assert_difference "Bubble.count", 1 do
post bucket_bubbles_url(buckets(:writebook))
end
assert_redirected_to bucket_bubble_url(buckets(:writebook), Bubble.last, editing: true)
assert_redirected_to bucket_bubble_url(buckets(:writebook), Bubble.last)
end
test "show" do