Sha256: fea3a9b7c1bad018675719b0a66dc44df994dcfaba816a86ab3f8cce6bbc9588

Contents?: true

Size: 455 Bytes

Versions: 1

Compression:

Stored size: 455 Bytes

Contents

# frozen_string_literal: true

module Archangel
  ##
  # Model concerns
  #
  module Models
    ##
    # Model meta tag concern
    #
    module MetatagableConcern
      extend ActiveSupport::Concern

      included do
        has_many :metatags, as: :metatagable, dependent: :destroy

        accepts_nested_attributes_for :metatags, reject_if: :all_blank,
                                                 allow_destroy: true
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
archangel-0.4.0 app/models/concerns/archangel/models/metatagable_concern.rb