- , ,
- Defined in:
Pages are published if published_at is not nil. TODO: schedule publish by comparing published_at to Time.now
Pages can have a parent. Top-level pages have no parent. Top-level pages appear in the navbar.
Pages must have a slug, usually based on title.
Pages render body_markdown as body_html on save.
Class Method Summary collapse
Methods included from
Class Method Details
.top_level ⇒ Object
22 23 24
# File 'app/models/page.rb', line 22 def self.top_level where(parent: nil) end