Class: Locomotive::Steam::Middlewares::Site
- Inherits:
-
ThreadSafe
- Object
- ThreadSafe
- Locomotive::Steam::Middlewares::Site
- Includes:
- Helpers
- Defined in:
- lib/locomotive/steam/middlewares/site.rb
Overview
Fetch a site using the site_finder service. Look for an existing site in the rack env variable (context: when launched from the Engine).
Instance Attribute Summary
Attributes inherited from ThreadSafe
Instance Method Summary collapse
Methods included from Helpers
#decorate_entry, #default_liquid_context, #default_locale, #html?, #json?, #liquid_assigns, #live_editing?, #locale, #locales, #log, #make_local_path, #modify_path, #mounted_on, #page, #params, #path, #redirect_to, #render_response, #repositories, #request, #services, #site
Methods inherited from ThreadSafe
Instance Method Details
#_call ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/locomotive/steam/middlewares/site.rb', line 11 def _call site = find_site no_site! if site.nil? # log anyway log_site(site) # redirect to the first domain and/or HTTPS if defined by the site redirect_if_required(site) end |