diff --git a/app/controllers/bubbles_controller.rb b/app/controllers/bubbles_controller.rb index 8d9d51e66..286a8818a 100644 --- a/app/controllers/bubbles_controller.rb +++ b/app/controllers/bubbles_controller.rb @@ -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 diff --git a/app/views/bubbles/_bubble.html.erb b/app/views/bubbles/_bubble.html.erb index 839db07a5..521197134 100644 --- a/app/views/bubbles/_bubble.html.erb +++ b/app/views/bubbles/_bubble.html.erb @@ -8,7 +8,7 @@

- <% 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 %> diff --git a/app/views/bubbles/show.html.erb b/app/views/bubbles/show.html.erb index 8e1f18493..292e8346b 100644 --- a/app/views/bubbles/show.html.erb +++ b/app/views/bubbles/show.html.erb @@ -80,7 +80,7 @@
- <%= render "bubbles/bubble", bubble: @bubble, editing: params[:editing] %> + <%= render "bubbles/bubble", bubble: @bubble %>
diff --git a/test/controllers/bubbles_controller_test.rb b/test/controllers/bubbles_controller_test.rb index 106f53ca2..ccbe1c573 100644 --- a/test/controllers/bubbles_controller_test.rb +++ b/test/controllers/bubbles_controller_test.rb @@ -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