Class: Redditor::Page

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/redditor/page.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.model_name ⇒ Object



20
21
22
# File 'app/models/redditor/page.rb', line 20

def self.model_name
  ActiveModel::Name.new(self, nil, 'Page')
end

Instance Method Details

#content_blocks ⇒ Object



24
25
26
# File 'app/models/redditor/page.rb', line 24

def content_blocks
  (self.text_blocks + self.video_blocks + self.images + self.slider_blocks).sort {|x, y| x.position <=> y.position}
end