Sha256: adbeeebf57dd6db21eb066e1ad35a71c99d97ab6560bcdc042cdec09cb7a7a0c

Contents?: true

Size: 710 Bytes

Versions: 11

Compression:

Stored size: 710 Bytes

Contents

require 'site_framework/current_state'

module SiteFramework

  # Return the current site, domain, domain_name
  # if it wasn't the default site
  module DummyHelper

    def current_site
      SiteFramework::CurrentState.instance.site
    end

    def current_domain
      SiteFramework::CurrentState.instance.domain
    end

    def current_domain_name
      SiteFramework::CurrentState.instance.domain_name
    end

    def default_site?
      return true if SiteFramework::CurrentState.instance.site.nil?
      false
    end
  end

  module Helpers
    extend ActiveSupport::Concern
    include SiteFramework::DummyHelper

    module ClassMethods
      include SiteFramework::DummyHelper
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
site_framework-4.3.3 lib/site_framework/helpers.rb
site_framework-4.3.2 lib/site_framework/helpers.rb
site_framework-4.3.1 lib/site_framework/helpers.rb
site_framework-4.3.0 lib/site_framework/helpers.rb
site_framework-4.2.0 lib/site_framework/helpers.rb
site_framework-4.1.2 lib/site_framework/helpers.rb
site_framework-4.1.0 lib/site_framework/helpers.rb
site_framework-4.0.1 lib/site_framework/helpers.rb
site_framework-4.0.0 lib/site_framework/helpers.rb
site_framework-3.2.0 lib/site_framework/helpers.rb
site_framework-3.1.0 lib/site_framework/helpers.rb