Sha256: ac9374a06f0ebbc7bc9da3da197fb29dde66ec57b100f442d7081e386e46be59

Contents?: true

Size: 536 Bytes

Versions: 3

Compression:

Stored size: 536 Bytes

Contents

module App
  # AppController -> Controller out the back-office
  class AppController < ::ApplicationController
    layout 'app/layouts/application'
    before_action :set_metas
    before_action :set_analytics

    def set_metas
      @setting = Setting.first
      @title = @setting.name
      @description = @setting.description
      @favicon = @setting.favicon
      @meta = MetaTag.get_by_url(request.url)
      @social = SocialAccount.last
    end

    private

    def set_analytics
      @scripts = Script.all
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
keppler-2.0.2 installer/core/app/controllers/app/app_controller.rb
keppler-2.0.1 installer/core/app/controllers/app/app_controller.rb
keppler-2.0.0 installer/core/app/controllers/app/app_controller.rb