Remove dead Tag::Attachable code and tags prompt
The tags prompt was added for the Fizzy Do command system, but became
dead code when commands were removed in 89af9066. The commands_prompt
was cleaned up but tags_prompt was missed.
Remove the Tag::Attachable concern, Prompts::TagsController, its views
and route, and the tags_prompt helper. Tag still includes
ActionText::Attachable directly, which is needed by the data transfer
system.
This commit is contained in:
@@ -1,9 +0,0 @@
|
|||||||
class Prompts::TagsController < ApplicationController
|
|
||||||
def index
|
|
||||||
@tags = Current.account.tags.all.alphabetically
|
|
||||||
|
|
||||||
if stale? etag: @tags
|
|
||||||
render layout: false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -7,10 +7,6 @@ module RichTextHelper
|
|||||||
content_tag "lexxy-prompt", "", trigger: "@", src: prompts_users_path, name: "mention"
|
content_tag "lexxy-prompt", "", trigger: "@", src: prompts_users_path, name: "mention"
|
||||||
end
|
end
|
||||||
|
|
||||||
def tags_prompt
|
|
||||||
content_tag "lexxy-prompt", "", trigger: "#", src: prompts_tags_path, name: "tag"
|
|
||||||
end
|
|
||||||
|
|
||||||
def cards_prompt
|
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
|
content_tag "lexxy-prompt", "", trigger: "#", src: prompts_cards_path, name: "card", "insert-editable-text": true, "remote-filtering": true, "supports-space-in-searches": true
|
||||||
end
|
end
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
class Tag < ApplicationRecord
|
class Tag < ApplicationRecord
|
||||||
include Attachable, Filterable
|
include ActionText::Attachable, Filterable
|
||||||
|
|
||||||
belongs_to :account, default: -> { Current.account }
|
belongs_to :account, default: -> { Current.account }
|
||||||
has_many :taggings, dependent: :destroy
|
has_many :taggings, dependent: :destroy
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
module Tag::Attachable
|
|
||||||
extend ActiveSupport::Concern
|
|
||||||
|
|
||||||
included do
|
|
||||||
include ActionText::Attachable
|
|
||||||
|
|
||||||
def attachable_plain_text_representation(...)
|
|
||||||
"##{title}"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<lexxy-prompt-item search="<%= tag.title %>" sgid="<%= tag.attachable_sgid %>">
|
|
||||||
<template type="menu">
|
|
||||||
#<%= tag.title %>
|
|
||||||
</template>
|
|
||||||
<template type="editor">
|
|
||||||
#<%= tag.title %>
|
|
||||||
</template>
|
|
||||||
</lexxy-prompt-item>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
<%= render partial: "prompts/tags/tag", collection: @tags %>
|
|
||||||
@@ -190,7 +190,6 @@ Rails.application.routes.draw do
|
|||||||
|
|
||||||
namespace :prompts do
|
namespace :prompts do
|
||||||
resources :cards
|
resources :cards
|
||||||
resources :tags
|
|
||||||
resources :users
|
resources :users
|
||||||
|
|
||||||
resources :boards do
|
resources :boards do
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
require "test_helper"
|
|
||||||
|
|
||||||
class Prompts::TagsControllerTest < ActionDispatch::IntegrationTest
|
|
||||||
setup do
|
|
||||||
sign_in_as :kevin
|
|
||||||
end
|
|
||||||
|
|
||||||
test "index" do
|
|
||||||
get prompts_tags_path
|
|
||||||
assert_response :success
|
|
||||||
end
|
|
||||||
end
|
|
||||||
Reference in New Issue
Block a user