Remove double nesting under bubbles for engagement
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
<div class="card__actions-container card__actions-container--top center border-radius flex-inline align-center justify-center gap" style="--bubble-color: <%= @bubble.color %>;">
|
||||
<span>Considering</span>
|
||||
<% if @bubble.doing? %>
|
||||
<%= form_with url: bucket_bubble_engagement_path(@bubble.bucket, @bubble), method: :delete, data: { controller: "form" }, class: "flex" do %>
|
||||
<%= form_with url: bubble_engagement_path(@bubble), method: :delete, data: { controller: "form" }, class: "flex" do %>
|
||||
<label class="switch flex-item-no-shrink">
|
||||
<input type="checkbox" class="switch__input" data-action="form#submit" checked>
|
||||
<span class="switch__btn round"></span>
|
||||
@@ -35,7 +35,7 @@
|
||||
</label>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= form_with url: bucket_bubble_engagement_path(@bubble.bucket, @bubble), method: :post, data: { controller: "form" }, class: "flex" do %>
|
||||
<%= form_with url: bubble_engagement_path(@bubble), method: :post, data: { controller: "form" }, class: "flex" do %>
|
||||
<label class="switch flex-item-no-shrink">
|
||||
<input type="checkbox" class="switch__input" data-action="form#submit">
|
||||
<span class="switch__btn round"></span>
|
||||
|
||||
+1
-1
@@ -14,6 +14,7 @@ Rails.application.routes.draw do
|
||||
resource :watch
|
||||
resources :assignments
|
||||
resources :boosts
|
||||
resource :engagement
|
||||
resources :taggings
|
||||
end
|
||||
end
|
||||
@@ -48,7 +49,6 @@ Rails.application.routes.draw do
|
||||
scope module: :bubbles do
|
||||
resource :image
|
||||
resource :pop
|
||||
resource :engagement
|
||||
resource :publish
|
||||
resource :recover
|
||||
resources :stagings
|
||||
|
||||
@@ -9,7 +9,7 @@ class Bubbles::EngagementsControllerTest < ActionDispatch::IntegrationTest
|
||||
bubble = bubbles(:text)
|
||||
|
||||
assert_changes -> { bubble.reload.doing? }, from: false, to: true do
|
||||
post bucket_bubble_engagement_url(bubble.bucket, bubble)
|
||||
post bubble_engagement_url(bubble)
|
||||
end
|
||||
|
||||
assert_redirected_to bucket_bubble_url(bubble.bucket, bubble)
|
||||
@@ -19,7 +19,7 @@ class Bubbles::EngagementsControllerTest < ActionDispatch::IntegrationTest
|
||||
bubble = bubbles(:logo)
|
||||
|
||||
assert_changes -> { bubble.reload.doing? }, from: true, to: false do
|
||||
delete bucket_bubble_engagement_url(bubble.bucket, bubble)
|
||||
delete bubble_engagement_url(bubble)
|
||||
end
|
||||
|
||||
assert_redirected_to bucket_bubble_url(bubble.bucket, bubble)
|
||||
|
||||
Reference in New Issue
Block a user