Class: Plum::Entry
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- ApplicationRecord
- Plum::Entry
- Includes:
- SiteScoped
- Defined in:
- app/models/plum/entry.rb
Constant Summary collapse
- HOMEPAGE_SLUG =
The page served at "/" — Plum resolves the homepage by this slug (convention over configuration). Its slug is locked and it can't be deleted while published, so a non-technical editor can't orphan the home page by renaming or removing it.
"home".freeze
Instance Method Summary collapse
Instance Method Details
#field_value(handle) ⇒ Object
36 37 38 |
# File 'app/models/plum/entry.rb', line 36 def field_value(handle) data&.dig(handle) end |
#homepage? ⇒ Boolean
40 41 42 |
# File 'app/models/plum/entry.rb', line 40 def homepage? slug == HOMEPAGE_SLUG end |