@ -14,6 +14,9 @@ class Status < ActiveRecord::Base
validates:account,presence:true
validates:uri,uniqueness:true,unless:'local?'
scope:with_counters,->{select('statuses.*, (select count(r.id) from statuses as r where r.reblog_of_id = statuses.id) as reblogs_count, (select count(f.id) from favourites as f where f.status_id = statuses.id) as favourites_count')}