Sha256: 55ba055306b723fb606ba4f2a1735c3650206208695ed2dde6cc77a3560deeb8

Contents?: true

Size: 369 Bytes

Versions: 30

Compression:

Stored size: 369 Bytes

Contents

module Workarea
  module CurrentReferrer
    def current_referrer
      return @current_referrer if defined?(@current_referrer)

      referrer = cookies['workarea_referrer']
      return unless referrer.present?

      @current_referrer ||= TrafficReferrer.new(
        RefererParser::Parser.new.parse(referrer).slice(:source, :medium, :uri)
      )
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
workarea-core-3.4.21 app/controllers/workarea/current_referrer.rb
workarea-core-3.4.20 app/controllers/workarea/current_referrer.rb
workarea-core-3.4.19 app/controllers/workarea/current_referrer.rb
workarea-core-3.4.18 app/controllers/workarea/current_referrer.rb
workarea-core-3.4.17 app/controllers/workarea/current_referrer.rb
workarea-core-3.4.16 app/controllers/workarea/current_referrer.rb
workarea-core-3.4.15 app/controllers/workarea/current_referrer.rb
workarea-core-3.4.14 app/controllers/workarea/current_referrer.rb
workarea-core-3.4.13 app/controllers/workarea/current_referrer.rb
workarea-core-3.4.12 app/controllers/workarea/current_referrer.rb