tracks debate visits from the controller

This commit is contained in:
rgarcia
2015-09-09 14:39:31 +02:00
parent cdc914de0d
commit e555126331
3 changed files with 26 additions and 3 deletions

View File

@@ -34,9 +34,6 @@ class Debate < ActiveRecord::Base
scope :sort_by_most_commented, -> { order(comments_count: :desc) }
scope :sort_by_random, -> { order("RANDOM()") }
# Ahoy setup
visitable # Ahoy will automatically assign visit_id on create
def likes
cached_votes_up
end