Module: Gricer::ActionController::Tracker

Defined in:
lib/gricer/action_controller/track.rb

Overview

Gricer’s Tracker module for ActionController

To include the Tracker module into ActionController add gricer_track_requests to your ApplicationController or to any Controller you want to track with Gricer.

Examples:

class ApplicationController < ActionController::Base
  protect_from_forgery
  gricer_track_requests
  [...]
end

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Include the helper functions and around_filter into controllers.



107
108
109
110
111
# File 'lib/gricer/action_controller/track.rb', line 107

def self.included(base)
  base.append_around_filter TrackRequestFilter
  base.helper TrackHelper
  base.helper_method :gricer_request
end

Instance Method Details

#gricer_requestGricer::Request

Get the actual gricer request instance.

Returns:

  • (Gricer::Request)


121
122
123
# File 'lib/gricer/action_controller/track.rb', line 121

def gricer_request
  @gricer_request
end

#gricer_request=(gricer_request) ⇒ Object

Set the actual gricer request instance.

Parameters:

  • gricer_request (Gricer::Request)

    The gricer request to be set as actual request instance.



115
116
117
# File 'lib/gricer/action_controller/track.rb', line 115

def gricer_request=(gricer_request)
  @gricer_request = gricer_request
end