Fix deleting tags (just need this for local data)

This commit is contained in:
Jason Zimdars
2024-10-06 13:05:21 -04:00
parent 9be032beda
commit 65f29ae3b5
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -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
+1 -1
View File
@@ -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 %>