Sha256: aae8f765d538a6c226ca09416244d1349acda6fecae6769b5cd79e3297df5a0e

Contents?: true

Size: 427 Bytes

Versions: 8

Compression:

Stored size: 427 Bytes

Contents

module Georgia
  class Slide < ActiveRecord::Base

    include Georgia::Concerns::Contentable
    include Georgia::Concerns::Orderable

    acts_as_list scope: :page
    attr_accessible :page_id
    belongs_to :revision, foreign_key: :page_id
    validates :page_id, presence: true

    # Returns a page if revision is a `current_revision` for a Georgia::Page
    def page
      @page ||= revision.try(:page)
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
georgia-0.7.8 app/models/georgia/slide.rb
georgia-0.7.7 app/models/georgia/slide.rb
georgia-0.7.6 app/models/georgia/slide.rb
georgia-0.7.5 app/models/georgia/slide.rb
georgia-0.7.4 app/models/georgia/slide.rb
georgia-0.7.3 app/models/georgia/slide.rb
georgia-0.7.2 app/models/georgia/slide.rb
georgia-0.7.1 app/models/georgia/slide.rb