Sha256: 196dfd9d0ea3fd676f03fdbf9d8c0aa186ed11e29163f1da07c889c74dc6f6d2
Contents?: true
Size: 744 Bytes
Versions: 3
Compression:
Stored size: 744 Bytes
Contents
module Enjoy::Seo::SeoHelper def enjoy_ym_counter_tag(counter_id) render partial: "blocks/ym", locals: {counter_id: counter_id} end def enjoy_ga_counter_tag(counter_id) render partial: "blocks/ga", locals: {counter_id: counter_id} end def render_enjoy_counters(opts = {}) ret = [] ym_counter_id = opts[:ym_counter_id] || Settings.ym_counter_id(default: '', kind: :string, title: 'Yandex Метрика ID').strip ga_counter_id = opts[:ga_counter_id] || Settings.ga_counter_id(default: '', kind: :string, title: 'Google Analitics ID').strip ret << enjoy_ym_counter_tag(ym_counter_id) unless ym_counter_id.blank? ret << enjoy_ga_counter_tag(ga_counter_id) unless ga_counter_id.blank? ret.join end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
enjoy_cms_seo-0.4.0.2 | app/helpers/enjoy/seo/seo_helper.rb |
enjoy_cms_seo-0.4.0.1 | app/helpers/enjoy/seo/seo_helper.rb |
enjoy_cms_seo-0.4.0 | app/helpers/enjoy/seo/seo_helper.rb |