Sha256: 780e999d660435339b1d606a3001cd8d8f65384004b9616cb74c09170a4c0e05

Contents?: true

Size: 558 Bytes

Versions: 3

Compression:

Stored size: 558 Bytes

Contents

module BitCore
  # Modeled after the presenter pattern. Ties data layer to view layer.
  class ContentProvider < ActiveRecord::Base
    belongs_to :content_module,
               class_name: "BitCore::ContentModule",
               foreign_key: :bit_core_content_module_id,
               inverse_of: :content_providers

    validates :type, :bit_core_content_module_id, :position, presence: true
    validates :position,
              numericality: { greater_than_or_equal_to: 1 },
              uniqueness: { scope: :bit_core_content_module_id }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bit_core-1.1.1 app/models/bit_core/content_provider.rb
bit_core-1.1.0 app/models/bit_core/content_provider.rb
bit_core-1.0.0 app/models/bit_core/content_provider.rb