Sha256: e0da3d258d8c61583e57b70852411de91e36f4e4a3d75fe89ffe57709d81d601

Contents?: true

Size: 548 Bytes

Versions: 11

Compression:

Stored size: 548 Bytes

Contents

module TestTrack::Controller
  extend ActiveSupport::Concern

  included do
    helper_method :test_track_session, :test_track_visitor
    helper TestTrack::ApplicationHelper
    around_action :manage_test_track_session
  end

  private

  def test_track_session
    @test_track_session ||= TestTrack::Session.new(self)
  end

  def test_track_visitor
    test_track_session.visitor_dsl
  end

  def manage_test_track_session
    RequestStore[:test_track_session] = test_track_session
    test_track_session.manage do
      yield
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
test_track_rails_client-4.0.0.alpha7 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-4.0.0.alpha6 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-4.0.0.alpha5 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-4.0.0.alpha4 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-4.0.0.alpha3 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-4.0.0.alpha2 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-4.0.0.alpha1 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-3.0.1 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-3.0.0 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-2.0.0 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-1.3.0 app/controllers/concerns/test_track/controller.rb