Module: Saucy::Kiss::ControllerFilters

Defined in:
lib/saucy/kiss/controller_filters.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



12
13
14
15
# File 'lib/saucy/kiss/controller_filters.rb', line 12

def self.included(base)
  base.send(:hide_action, :identify_to_kissmetrics)
  base.send(:before_filter, :identify_to_kissmetrics)
end

Instance Method Details

#identify_to_kissmetricsObject



4
5
6
7
8
9
10
# File 'lib/saucy/kiss/controller_filters.rb', line 4

def identify_to_kissmetrics
  if signed_out?
    km.identify(nil)
  elsif current_account?
    km.identify("account-#{.id}")
  end
end