Introduce triaging vocabulary
This commit is contained in:
+1
-2
@@ -1,11 +1,10 @@
|
||||
class Card < ApplicationRecord
|
||||
include Assignable, Attachments, Cacheable, Closeable, Colored, Entropic, Eventable,
|
||||
Golden, Mentions, Multistep, Pinnable, Postponable, Promptable, Readable, Searchable,
|
||||
Staged, Stallable, Statuses, Taggable, Watchable
|
||||
Staged, Stallable, Statuses, Taggable, Triageable, Watchable
|
||||
|
||||
belongs_to :collection, touch: true
|
||||
belongs_to :creator, class_name: "User", default: -> { Current.user }
|
||||
belongs_to :column, optional: true
|
||||
|
||||
has_many :comments, dependent: :destroy
|
||||
has_one_attached :image, dependent: :purge_later
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
module Card::Triageable
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
belongs_to :column, optional: true
|
||||
|
||||
scope :untriaged, -> { where.missing(:column) }
|
||||
scope :triaged, -> { joins(:column) }
|
||||
end
|
||||
end
|
||||
@@ -1,11 +1,10 @@
|
||||
class Collection < ApplicationRecord
|
||||
include AutoClosing, Accessible, Broadcastable, Entropic, Filterable, Publishable, Workflowing
|
||||
include AutoClosing, Accessible, Broadcastable, Entropic, Filterable, Publishable, Triageable, Workflowing
|
||||
|
||||
belongs_to :creator, class_name: "User", default: -> { Current.user }
|
||||
|
||||
has_rich_text :public_description
|
||||
|
||||
has_many :columns, dependent: :destroy
|
||||
has_many :cards, dependent: :destroy
|
||||
has_many :tags, -> { distinct }, through: :cards
|
||||
has_many :events
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
module Collection::Triageable
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
has_many :columns, dependent: :destroy
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user