Sha256: d5b27215fc3369506fc926035afc6e37d870d96ad6807bad2a18805298929a12

Contents?: true

Size: 339 Bytes

Versions: 2

Compression:

Stored size: 339 Bytes

Contents

module CurrentDomain
  module Controllers
    module Helpers
      extend ActiveSupport::Concern

      def current_domain
        @current_domain ||= find_domain(request.host)
      end

      included do
        helper_method :current_domain
      end

      private

      def find_domain(host)
        host
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
current_domain-1.0 lib/current_domain/controllers/helpers.rb
current_domain-0.1 lib/current_domain/controllers/helpers.rb