Files
fizzy/app/models/collection.rb
T
David Heinemeier Hansson 827c00ce49 Extract Workflowing concern
2025-04-22 12:32:34 +02:00

11 lines
320 B
Ruby

class Collection < ApplicationRecord
include Accessible, Broadcastable, Filterable, Workflowing
belongs_to :creator, class_name: "User", default: -> { Current.user }
has_many :cards, dependent: :destroy
has_many :tags, -> { distinct }, through: :cards
scope :alphabetically, -> { order("lower(name)") }
end