Sha256: 340d810ac22b34b6054a98a3d1bbe617f08ad16c47811c86b3f982cf0c2dac2f

Contents?: true

Size: 395 Bytes

Versions: 2

Compression:

Stored size: 395 Bytes

Contents

module Para
  module Page
    module Model
      extend ActiveSupport::Concern

      included do
        has_many :sections, -> { ordered }, class_name: '::Para::Page::Section',
                                            as: :page,
                                            dependent: :destroy
        accepts_nested_attributes_for :sections, allow_destroy: true
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
para-0.7.1 lib/para/page/model.rb
para-0.7.0 lib/para/page/model.rb