Sha256: 809061d5de7e9004f31910d364be4f920cbdce389e71cf8d57401ec8166e211f

Contents?: true

Size: 402 Bytes

Versions: 3

Compression:

Stored size: 402 Bytes

Contents

require_relative 'tracker'

module Sojourn
  module Controller

    def self.included(base)
      base.before_filter :track_sojourning
      base.before_filter :save_sojourn_session
    end

    def sojourn
      @sojourn ||= Tracker.new(self)
    end

  private

    def track_sojourning
      sojourn.sojourning!
    end

    def save_sojourn_session
      sojourn.update_session!
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sojourn-1.0.0.pre2 lib/sojourn/controller.rb
sojourn-1.0.0.pre lib/sojourn/controller.rb
sojourn-0.0.7 lib/sojourn/controller.rb