Class: StylesheetPage

Inherits:
Page
  • Object
show all
Includes:
Sheet::Instance
Defined in:
app/models/stylesheet_page.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Sheet::Instance

#cache?, #cache_marker, #child_path, #digest, #digest!, #find_by_path, #find_by_url, included, #layout, #upload=, #virtual?

Class Method Details

.new_with_defaults(config = Radiant::Config) ⇒ Object



8
9
10
11
12
13
14
# File 'app/models/stylesheet_page.rb', line 8

def self.new_with_defaults(config = Radiant::Config)
  page = StylesheetPage.new
  page.parts.concat(self.default_page_parts)
  page.parent_id = StylesheetPage.root.try(:id)
  page.status_id = Status[:published].id
  page
end

Instance Method Details

#headersObject



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

def headers
  {'Content-Type' => 'text/css'}
end