Sha256: 7fd8799e492f00a80c85057f2290186c1f7751aa10c3eecd19552ca23c061689
Contents?: true
Size: 1.26 KB
Versions: 25
Compression:
Stored size: 1.26 KB
Contents
# frozen_string_literal: true module App # AppController -> Controller out the back-office class AppController < ::ApplicationController layout 'app/layouts/application' skip_before_action :verify_authenticity_token before_action :set_metas before_action :set_analytics def set_metas @theme_color = nil # Descomentar el modelo que exista depende del proyecto # @post = KepplerBlog::Post.find(params[:id]) # @product = Product.find(params[:id]) @setting = Setting.first @meta = MetaTag.get_by_url(request.url) @social = SocialAccount.last @meta_title = MetaTag.title(@post, @product, @setting) @meta_description = MetaTag.description(@post, @product, @setting) @meta_image = MetaTag.image(request, @post, @product, @setting) @meta_locale = @locale.eql?('es') ? 'es_VE' : 'en_US' @meta_locale_alternate = @locale.eql?('es') ? 'en_US' : 'es_VE' @country_code = @locale.eql?('es') ? 'VE' : 'US' end private def default_url_options(options = {}) logger.debug "default_url_options is passed options: #{options.inspect}\n" { locale: I18n.locale } end def set_analytics @scripts = Script.select { |x| x.url == request.env['PATH_INFO'] } end end end
Version data entries
25 entries across 24 versions & 1 rubygems