Sha256: 162c5bb6b61296b76f5d15ef76a2847c3513d958d1347840b3866e91c693e3f2
Contents?: true
Size: 495 Bytes
Versions: 32
Compression:
Stored size: 495 Bytes
Contents
# frozen_string_literal: true module Decidim # Categories serve as a taxonomy for attachments to use for while in the # context of a participatory space. class AttachmentCollection < ApplicationRecord belongs_to :collection_for, polymorphic: true has_many :attachments, foreign_key: "attachment_collection_id", class_name: "Decidim::Attachment", dependent: :nullify default_scope { order(arel_table[:weight].asc) } def unused? attachments.empty? end end end
Version data entries
32 entries across 32 versions & 1 rubygems