Fix page hits count

This commit is contained in:
Christophe Vilayphiou 2012-05-19 01:59:17 +08:00
parent db410b9c50
commit dc4116bc3d
1 changed files with 2 additions and 0 deletions

View File

@ -42,6 +42,8 @@ module Impressionist
# column_name = cache_options[:column_name].to_sym
# count = cache_options[:unique] ? impressionist_count(:filter => :ip_address) : impressionist_count
# update_attribute(column_name, count)
cache_options = self.class.impressionist_counter_cache_options
column_name = cache_options[:column_name].to_sym
update_attribute(column_name, self.send(cache_options[:column_name]) + 1)
end