app/models/georgia/slide.rb in georgia-0.7.8 vs app/models/georgia/slide.rb in georgia-0.8.0
- old
+ new
@@ -1,14 +1,14 @@
module Georgia
class Slide < ActiveRecord::Base
- include Georgia::Concerns::Contentable
- include Georgia::Concerns::Orderable
+ include Concerns::Contentable
- acts_as_list scope: :page
- attr_accessible :page_id
+ # acts_as_list scope: :page
belongs_to :revision, foreign_key: :page_id
validates :page_id, presence: true
+
+ scope :ordered, -> { order(:position) }
# Returns a page if revision is a `current_revision` for a Georgia::Page
def page
@page ||= revision.try(:page)
end
\ No newline at end of file