Introduce triaging vocabulary

This commit is contained in:
Jorge Manrubia
2025-09-24 16:35:16 +02:00
parent 2f6a639682
commit 613f4b0110
4 changed files with 19 additions and 4 deletions
+1 -2
View File
@@ -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
+10
View File
@@ -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 -2
View File
@@ -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
+7
View File
@@ -0,0 +1,7 @@
module Collection::Triageable
extend ActiveSupport::Concern
included do
has_many :columns, dependent: :destroy
end
end