Fix deleting tags (just need this for local data)
This commit is contained in:
@@ -2,6 +2,7 @@ class TagsController < ApplicationController
|
||||
include BucketScoped
|
||||
|
||||
before_action :set_bubble, only: %i[ new create ]
|
||||
skip_before_action :set_bucket, only: :destroy
|
||||
|
||||
def index
|
||||
@tags = Current.account.tags.order(:title)
|
||||
@@ -17,7 +18,7 @@ class TagsController < ApplicationController
|
||||
|
||||
def destroy
|
||||
Current.account.tags.find(params[:id]).destroy
|
||||
redirect_to bucket_tags_url(@bucket)
|
||||
redirect_to root_path
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<%= tag.bubbles.map(&:title).to_sentence %>
|
||||
</span>
|
||||
|
||||
<%= button_to tag, class: "btn txt-small", method: :delete, data: { turbo_confirm: "Are you sure?" } do %>
|
||||
<%= button_to tag_path(tag), class: "btn txt-small", method: :delete, data: { turbo_confirm: "Are you sure?" } do %>
|
||||
<%= image_tag "remove.svg", aria: { hidden: true }, size: 24 %>
|
||||
<span class="for-screen-reader">Delete</span>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user