Sha256: e3cca99583a1905675bedbf808d38ed7c2bd7f30f14add083aa843f656353674

Contents?: true

Size: 487 Bytes

Versions: 2

Compression:

Stored size: 487 Bytes

Contents

module Pulitzer
  class FreeFormSectionType < ActiveRecord::Base
    include Pulitzer::PostTypeElement

    belongs_to :post_type_version
    has_many :free_form_sections
    has_many :partial_types, -> { order :id }

    def first_partial_type
      partial_types.first
    end

    def clone_me
      clone_attrs = self.attributes.dup
      clone_attrs.delete 'id'
      clone_attrs.delete 'post_type_version_id'
      Pulitzer::FreeFormSectionType.new(clone_attrs)
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pulitzer-0.15.12 app/models/pulitzer/free_form_section_type.rb
pulitzer-0.15.11 app/models/pulitzer/free_form_section_type.rb