Move bubbles publish out from the double nesting
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
<%= button_to bucket_bubble_publish_path(bubble.bucket, bubble), class: "btn txt-small btn--link", style: "--btn-background: #{ bubble.color }" do %>
|
||||
<%= button_to bubble_publish_path(bubble), class: "btn txt-small btn--link", style: "--btn-background: #{bubble.color}" do %>
|
||||
<span>Post to project</span>
|
||||
<% end %>
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
|
||||
<% if @bubble.creating? %>
|
||||
<div class="margin-block-start flex align-center gap">
|
||||
<%= button_to "Create card", bucket_bubble_publish_path(@bubble.bucket, @bubble), class: "btn btn--reversed" %>
|
||||
<%= button_to "Create card", bubble_publish_path(@bubble), class: "btn btn--reversed" %>
|
||||
<%= button_to "Save as draft", bucket_bubble_path(@bubble.bucket, @bubble), name: "bubble[status]", value: "drafted", method: :put, class: "btn" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
+1
-1
@@ -13,6 +13,7 @@ Rails.application.routes.draw do
|
||||
resource :image
|
||||
resource :pin
|
||||
resource :pop
|
||||
resource :publish
|
||||
resource :watch
|
||||
|
||||
resources :assignments
|
||||
@@ -50,7 +51,6 @@ Rails.application.routes.draw do
|
||||
resource :readings, only: :create
|
||||
|
||||
scope module: :bubbles do
|
||||
resource :publish
|
||||
resource :recover
|
||||
resources :stagings
|
||||
end
|
||||
|
||||
@@ -10,7 +10,7 @@ class Bubbles::PublishesControllerTest < ActionDispatch::IntegrationTest
|
||||
bubble.drafted!
|
||||
|
||||
assert_changes -> { bubble.reload.published? }, from: false, to: true do
|
||||
post bucket_bubble_publish_url(bubble.bucket, bubble)
|
||||
post bubble_publish_path(bubble)
|
||||
end
|
||||
|
||||
assert_redirected_to bubble
|
||||
|
||||
Reference in New Issue
Block a user