Skip to content

Commit 127156e

Browse files
authored
Merge pull request #2829 from basecamp/remove-tag-attachable
Remove dead Tag::Attachable code and tags prompt
2 parents f3f9aec + 975b899 commit 127156e

File tree

9 files changed

+8
-54
lines changed

9 files changed

+8
-54
lines changed

app/controllers/prompts/tags_controller.rb

Lines changed: 0 additions & 9 deletions
This file was deleted.

app/helpers/rich_text_helper.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ def global_mentions_prompt
77
content_tag "lexxy-prompt", "", trigger: "@", src: prompts_users_path, name: "mention"
88
end
99

10-
def tags_prompt
11-
content_tag "lexxy-prompt", "", trigger: "#", src: prompts_tags_path, name: "tag"
12-
end
13-
1410
def cards_prompt
1511
content_tag "lexxy-prompt", "", trigger: "#", src: prompts_cards_path, name: "card", "insert-editable-text": true, "remote-filtering": true, "supports-space-in-searches": true
1612
end

app/models/tag.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class Tag < ApplicationRecord
2-
include Attachable, Filterable
2+
include Filterable
33

44
belongs_to :account, default: -> { Current.account }
55
has_many :taggings, dependent: :destroy

app/models/tag/attachable.rb

Lines changed: 0 additions & 11 deletions
This file was deleted.

app/views/prompts/tags/_tag.html.erb

Lines changed: 0 additions & 8 deletions
This file was deleted.

app/views/prompts/tags/index.html.erb

Lines changed: 0 additions & 1 deletion
This file was deleted.

config/routes.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@
190190

191191
namespace :prompts do
192192
resources :cards
193-
resources :tags
194193
resources :users
195194

196195
resources :boards do

test/controllers/prompts/tags_controller_test.rb

Lines changed: 0 additions & 12 deletions
This file was deleted.

test/models/account/data_transfer/action_text/rich_text_record_set_test.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ class Account::DataTransfer::ActionText::RichTextRecordSetTest < ActiveSupport::
4444
end
4545

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

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

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

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

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

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

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

8080
record_set = Account::DataTransfer::ActionText::RichTextRecordSet.new(accounts(:"37s"))

0 commit comments

Comments
 (0)