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_nameObject


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

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

Instance Method Details

#content_blocksObject


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

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

#to_partial_pathObject


27
28
29
# File 'app/models/redditor/page.rb', line 27

def to_partial_path
  'redditor/page'
end