Class: Grandstand::Page

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#new_parent_slug=(value) ⇒ Object (writeonly)

Sets the attribute new_parent_slug

Parameters:

  • value

    the value to set the attribute new_parent_slug to.



4
5
6
# File 'app/models/grandstand/page.rb', line 4

def new_parent_slug=(value)
  @new_parent_slug = value
end

Class Method Details

.per_pageObject



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

def per_page
  10
end

Instance Method Details

#class_nameObject



28
29
30
# File 'app/models/grandstand/page.rb', line 28

def class_name
  @class_name ||= class_names.join(' ')
end

#class_namesObject



32
33
34
# File 'app/models/grandstand/page.rb', line 32

def class_names
  @class_names ||= page_sections.group_by(&:section).map{|section, page_sections| "has-#{section}"}
end