Sha256: c7a66d4c774b304cde29afeadd4cc0c96cb6234cb485e032a7c025d88564cfaa

Contents?: true

Size: 391 Bytes

Versions: 6

Compression:

Stored size: 391 Bytes

Contents

module Pulitzer
  class PostTypeContentElementType < ActiveRecord::Base
    include Pulitzer::PostTypeElement
    
    belongs_to :post_type
    belongs_to :content_element_type
    has_one :content_element
    before_save :handle_sort_order

    delegate :type, :image_type?, to: :content_element_type

    default_scope { order(id: :asc) }

    validates :label, presence: true

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pulitzer-0.12.5 app/models/pulitzer/post_type_content_element_type.rb
pulitzer-0.12.4 app/models/pulitzer/post_type_content_element_type.rb
pulitzer-0.12.3 app/models/pulitzer/post_type_content_element_type.rb
pulitzer-0.12.2 app/models/pulitzer/post_type_content_element_type.rb
pulitzer-0.12.1 app/models/pulitzer/post_type_content_element_type.rb
pulitzer-0.12.0 app/models/pulitzer/post_type_content_element_type.rb