Sha256: 9cfa6389838268525a1c3c46540c256c88beb6483d030df9fa762d7be9b561cf

Contents?: true

Size: 537 Bytes

Versions: 24

Compression:

Stored size: 537 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_controller] = self
    test_track_session.manage do
      yield
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
test_track_rails_client-1.2.0 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-1.1.0 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-1.0.0 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-0.9.20 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-0.9.19 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-0.9.18 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-0.9.17 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-0.9.16 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-0.9.15 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-0.9.14 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-0.9.13 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-0.9.12 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-0.9.11 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-0.9.10 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-0.9.9 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-0.9.8 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-0.9.7 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-0.9.6 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-0.9.5 app/controllers/concerns/test_track/controller.rb
test_track_rails_client-0.9.4 app/controllers/concerns/test_track/controller.rb