Sha256: 1b3840dfc09b1ac7945026fe54d91e8e7f0c9be3deaeccfbb2f51063dc4158a2

Contents?: true

Size: 430 Bytes

Versions: 1

Compression:

Stored size: 430 Bytes

Contents

module BitPlayer
  class Slideshow < ActiveRecord::Base
    has_many :slides,
      -> { order 'position' },
      class_name: 'BitPlayer::Slide',
      foreign_key: :bit_player_slideshow_id,
      dependent: :destroy,
      inverse_of: :slideshow
    has_one :bit_player_content_provider, as: :source_content, inverse_of: :source_content

    validates :title, presence: true

    accepts_nested_attributes_for :slides
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bit_player-0.0.4 app/models/bit_player/slideshow.rb