Class: Maglev::FetchPage

Inherits:
Object
  • Object
show all
Includes:
Injectable
Defined in:
app/services/maglev/fetch_page.rb

Overview

Retrieve a page from a path and a locale (previously extracted by the ExtractLocale service)

Instance Method Summary collapse

Instance Method Details

#callObject



15
16
17
18
19
# File 'app/services/maglev/fetch_page.rb', line 15

def call
  page = fetch_page(path, locale)
  page = fetch_page(path, default_locale) if !page && fallback_to_default_locale
  page
end