Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Show HN: IndieFeeds.com, HN clone where submissions come from personal websites. Parent comment
scope :ranked, -> { select('posts.*, ((posts.upvotes_count + 1) / POWER(EXTRACT(EPOCH FROM (NOW() - posts.published_at)), 1.8)) AS rank').order('rank DESC') }
scope :ranked, -> { select('posts.*, ((posts.upvotes_count + 1) / POWER(EXTRACT(EPOCH FROM (NOW() - posts.published_at)), 1.8)) AS rank').order('rank DESC') }