Sha256: 56dfeb1344d0b4ce1f6028ec0ad34d3cb20c689c14e0ce4d5e76beaed1f0c0d7

Contents?: true

Size: 475 Bytes

Versions: 2

Compression:

Stored size: 475 Bytes

Contents

# frozen_string_literal: true

require "active_support/concern"

module Decidim
  # A concern with the features needed when you want a model to be able to create
  # links from it to another resource.
  module HasAttachmentCollections
    extend ActiveSupport::Concern

    included do
      has_many :attachment_collections,
               class_name: "Decidim::AttachmentCollection",
               dependent: :destroy,
               as: :collection_for
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
decidim-core-0.10.1 lib/decidim/has_attachment_collections.rb
decidim-core-0.10.0 lib/decidim/has_attachment_collections.rb