Module: ApplicationHelper
- Includes:
- Stimulus::TagHelper
- Defined in:
- app/helpers/application_helper.rb
Instance Method Summary collapse
- #devise_mapping ⇒ Object
- #hh_meta_tags ⇒ Object
- #resource ⇒ Object
- #resource_name ⇒ Object
- #site_description ⇒ Object
- #site_keywords ⇒ Object
- #site_title ⇒ Object
Methods included from Stimulus::TagHelper
Instance Method Details
#devise_mapping ⇒ Object
29 30 31 |
# File 'app/helpers/application_helper.rb', line 29 def devise_mapping @devise_mapping ||= Devise.mappings[:user] end |
#hh_meta_tags ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'app/helpers/application_helper.rb', line 33 def params = { title: site_title, description: site_description, reverse: true, keywords: site_keywords, charset: 'utf-8', open_search: { title: 'Hungry Hub', href: "#{Figaro.env.hh_host_url!}/restaurants/opensearch.xml", }, twitter: { site: '@hungryhub', account_id: '2228367530', }, fb: { page_id: '372850069508787', admins: '', app_id: '1377993762506689', }, } params rescue StandardError => e APMErrorHandler.report(e, params) '' end |
#resource ⇒ Object
25 26 27 |
# File 'app/helpers/application_helper.rb', line 25 def resource @resource ||= User.new end |
#resource_name ⇒ Object
21 22 23 |
# File 'app/helpers/application_helper.rb', line 21 def resource_name :user end |
#site_description ⇒ Object
13 14 15 |
# File 'app/helpers/application_helper.rb', line 13 def site_description AdminSetting.with_lang('default_site_description', MyLocaleManager.normalize_locale) end |
#site_keywords ⇒ Object
17 18 19 |
# File 'app/helpers/application_helper.rb', line 17 def site_keywords AdminSetting.with_lang('default_site_keywords', MyLocaleManager.normalize_locale) end |
#site_title ⇒ Object
9 10 11 |
# File 'app/helpers/application_helper.rb', line 9 def site_title AdminSetting.with_lang('default_site_title', MyLocaleManager.normalize_locale) end |