Class: Maglev::Page
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Maglev::Page
- Includes:
- PathConcern, SearchConcern, SectionsConcern, Translatable
- Defined in:
- app/models/maglev/page.rb
Defined Under Namespace
Modules: PathConcern, SearchConcern
Instance Method Summary collapse
-
#home ⇒ Object
scopes ##.
-
#index? ⇒ Boolean
methods ##.
- #static? ⇒ Boolean
-
#title ⇒ Object
translations ##.
Methods included from PathConcern
#current_path, #default_path, #disable_spawn_redirection, #path, #path=, #path_hash, #spawn_redirection_disabled?
Methods included from SectionsConcern
#prepare_sections, #prepare_sections_translations
Methods included from Translatable
Instance Method Details
#home ⇒ Object
scopes ##
18 |
# File 'app/models/maglev/page.rb', line 18 scope :home, ->(locale = nil) { by_path('index', locale) } |
#index? ⇒ Boolean
methods ##
30 31 32 |
# File 'app/models/maglev/page.rb', line 30 def index? path == 'index' end |
#static? ⇒ Boolean
34 35 36 |
# File 'app/models/maglev/page.rb', line 34 def static? false end |
#title ⇒ Object
translations ##
12 |
# File 'app/models/maglev/page.rb', line 12 translates :title, presence: true |