Class: Locomotive::Public::RobotsController

Inherits:
BaseController
  • Object
show all
Includes:
Render
Defined in:
app/controllers/locomotive/public/robots_controller.rb

Instance Method Summary collapse

Methods included from ActionController::UrlHelpers

#current_site_public_url, #public_page_url, #switch_to_site_url

Methods included from ActionController::SectionHelpers

#sections

Methods included from ActionController::LocaleHelpers

#back_to_default_site_locale, #current_content_locale, #localized?, #set_back_office_locale, #set_current_content_locale, #setup_i18n_fallbacks

Instance Method Details

#showObject



9
10
11
12
# File 'app/controllers/locomotive/public/robots_controller.rb', line 9

def show
  template = ::Liquid::Template.parse(current_site.robots_txt)
  render text: template.render(locomotive_context.merge('request_host' => self.request.host.downcase))
end