Sha256: 48e21b0ce29d5390e7cfcbacd376d23613844cb49ddb707279df994cbfcbaa8e

Contents?: true

Size: 575 Bytes

Versions: 3

Compression:

Stored size: 575 Bytes

Contents

module BitPlayer
  class ContentProvider < ActiveRecord::Base
    include BitPlayer::ContentProviders::ViewProvider

    belongs_to :content_module,
      class_name: "BitPlayer::ContentModule",
      foreign_key: :bit_player_content_module_id,
      inverse_of: :content_providers
    belongs_to :source_content, polymorphic: true

    validates :content_module, :position, presence: true
    validates_numericality_of :position, greater_than_or_equal_to: 1

    delegate :context, to: :content_module, prefix: false

    def exists?(position)
      false
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bit_player-0.1.3 app/models/bit_player/content_provider.rb
bit_player-0.1.2 app/models/bit_player/content_provider.rb
bit_player-0.1.1 app/models/bit_player/content_provider.rb