Class: Occurro::CountersController

Inherits:
ApplicationController show all
Defined in:
app/controllers/occurro/counters_controller.rb

Instance Method Summary collapse

Instance Method Details

#incrementObject



5
6
7
8
9
10
11
# File 'app/controllers/occurro/counters_controller.rb', line 5

def increment
  if Occurro::CachedSession.unique_visitor?(countable, session)
    countable.increment_counter
    Occurro::CachedSession.add_cache(countable, session)
  end
  render text: ""
end