Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions app/controllers/prompts/tags_controller.rb

This file was deleted.

4 changes: 0 additions & 4 deletions app/helpers/rich_text_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ def global_mentions_prompt
content_tag "lexxy-prompt", "", trigger: "@", src: prompts_users_path, name: "mention"
end

def tags_prompt
content_tag "lexxy-prompt", "", trigger: "#", src: prompts_tags_path, name: "tag"
end

def cards_prompt
content_tag "lexxy-prompt", "", trigger: "#", src: prompts_cards_path, name: "card", "insert-editable-text": true, "remote-filtering": true, "supports-space-in-searches": true
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/tag.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class Tag < ApplicationRecord
include Attachable, Filterable
include Filterable

belongs_to :account, default: -> { Current.account }
has_many :taggings, dependent: :destroy
Expand Down
11 changes: 0 additions & 11 deletions app/models/tag/attachable.rb

This file was deleted.

8 changes: 0 additions & 8 deletions app/views/prompts/tags/_tag.html.erb

This file was deleted.

1 change: 0 additions & 1 deletion app/views/prompts/tags/index.html.erb

This file was deleted.

1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@

namespace :prompts do
resources :cards
resources :tags
resources :users

resources :boards do
Expand Down
12 changes: 0 additions & 12 deletions test/controllers/prompts/tags_controller_test.rb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ class Account::DataTransfer::ActionText::RichTextRecordSetTest < ActiveSupport::
end

test "transform_body_for_import skips GIDs belonging to another account" do
victim_tag = tags(:web)
victim_user = users(:david)
attacker_account = accounts(:initech)
assert_not_equal attacker_account.id, victim_tag.account_id
assert_not_equal attacker_account.id, victim_user.account_id

cross_tenant_gid = victim_tag.to_global_id.to_s
cross_tenant_gid = victim_user.to_global_id.to_s
html = %(<action-text-attachment gid="#{cross_tenant_gid}"></action-text-attachment>)

record_set = Account::DataTransfer::ActionText::RichTextRecordSet.new(attacker_account)
Expand All @@ -59,11 +59,11 @@ class Account::DataTransfer::ActionText::RichTextRecordSetTest < ActiveSupport::
end

test "transform_body_for_import converts GIDs belonging to the same account" do
own_tag = tags(:web)
own_user = users(:david)
own_account = accounts(:"37s")
assert_equal own_account.id, own_tag.account_id
assert_equal own_account.id, own_user.account_id

same_account_gid = own_tag.to_global_id.to_s
same_account_gid = own_user.to_global_id.to_s
html = %(<action-text-attachment gid="#{same_account_gid}"></action-text-attachment>)

record_set = Account::DataTransfer::ActionText::RichTextRecordSet.new(own_account)
Expand All @@ -74,7 +74,7 @@ class Account::DataTransfer::ActionText::RichTextRecordSetTest < ActiveSupport::
end

test "transform_body_for_import handles non-existent record GIDs gracefully" do
nonexistent_gid = "gid://fizzy/Tag/00000000000000000000000000"
nonexistent_gid = "gid://fizzy/User/00000000000000000000000000"
html = %(<action-text-attachment gid="#{nonexistent_gid}"></action-text-attachment>)

record_set = Account::DataTransfer::ActionText::RichTextRecordSet.new(accounts(:"37s"))
Expand Down
Loading