Sha256: 991c455e748a8101a7d3403611e415bbbe6ee867fbcc524844bff5f5ef7c3282

Contents?: true

Size: 458 Bytes

Versions: 47

Compression:

Stored size: 458 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,
                                            inverse_of: :page
        accepts_nested_attributes_for :sections, allow_destroy: true
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
para-0.12.4 lib/para/page/model.rb
para-0.12.3 lib/para/page/model.rb
para-0.12.2 lib/para/page/model.rb
para-0.12.1 lib/para/page/model.rb
para-0.12.0 lib/para/page/model.rb
para-0.11.4 lib/para/page/model.rb
para-0.11.3 lib/para/page/model.rb
para-0.11.2 lib/para/page/model.rb
para-0.11.1 lib/para/page/model.rb
para-0.11.0 lib/para/page/model.rb
para-0.10.0 lib/para/page/model.rb
para-0.9.4 lib/para/page/model.rb
para-0.9.3.3 lib/para/page/model.rb
para-0.9.3.2 lib/para/page/model.rb
para-0.9.3.1 lib/para/page/model.rb
para-0.9.2 lib/para/page/model.rb
para-0.9.0 lib/para/page/model.rb
para-0.8.15 lib/para/page/model.rb
para-0.8.14 lib/para/page/model.rb
para-0.8.13 lib/para/page/model.rb