Module: Locomotive::ErrorsHelper

Defined in:
app/helpers/locomotive/errors_helper.rb

Instance Method Summary collapse

Instance Method Details

#error_titleObject



4
5
6
# File 'app/helpers/locomotive/errors_helper.rb', line 4

def error_title
  @title || t(:title, scope: "locomotive.errors.#{action_name.gsub('error_', '')}")
end

#no_site_message(error_type) ⇒ Object



18
19
20
# File 'app/helpers/locomotive/errors_helper.rb', line 18

def no_site_message(error_type)
  t(error_type, host: h(request.host), scope: 'locomotive.errors.no_site.message')
end


8
9
10
11
12
13
14
15
16
# File 'app/helpers/locomotive/errors_helper.rb', line 8

def no_site_message_and_link
  options = Locomotive.config.host ? { host: Locomotive.config.host } : { only_path: true }

  if 
    [no_site_message(:add_domain), sites_url(options)]
  else
    [no_site_message(:sign_in), (options)]
  end
end