Sha256: 8c02afeee74f2ef197b55643bd2fb26065b331b82df160c2e9d28e698819b0ed

Contents?: true

Size: 490 Bytes

Versions: 4

Compression:

Stored size: 490 Bytes

Contents

module BitPlayer
  # A collection of ordered Slides.
  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 :content_provider, as: :source_content, inverse_of: :source_content

    validates :title, presence: true

    accepts_nested_attributes_for :slides
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bit_player-0.2.2 app/models/bit_player/slideshow.rb
bit_player-0.2.1 app/models/bit_player/slideshow.rb
bit_player-0.2.0 app/models/bit_player/slideshow.rb
bit_player-0.1.4 app/models/bit_player/slideshow.rb