scope :ranked, -> { select('posts.*, ((posts.upvotes_count + 1) / POWER(EXTRACT(EPOCH FROM (NOW() - posts.published_at)), 1.8)) AS rank').order('rank DESC') }