Make the view count cookie names shorter

This commit is contained in:
Marcin Kulik 2014-01-29 16:10:18 +01:00
parent 97aa36e853
commit 9589df952f

View File

@ -1,7 +1,7 @@
class ViewCounter class ViewCounter
def increment(asciicast, storage) def increment(asciicast, storage)
key = :"asciicast_#{asciicast.id}_viewed" key = "a#{asciicast.id}"
return if storage[key] return if storage[key]
Asciicast.increment_counter(:views_count, asciicast.id) Asciicast.increment_counter(:views_count, asciicast.id)