From 85b00d19b840bae98322c2372e8e0e3ebd66f2e0 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 26 Mar 2016 13:42:10 +0100 Subject: Moving Salmon notifications to background processing, fixing mini-profiler behaviour with Turbolinks enabled, optimizing Rabl for production --- app/models/status.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/status.rb') diff --git a/app/models/status.rb b/app/models/status.rb index 439cd3053..7ea92df2c 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -17,7 +17,7 @@ class Status < ActiveRecord::Base validates :text, presence: true, if: Proc.new { |s| s.local? && !s.reblog? } 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') } - scope :with_includes, -> { includes(:account, :mentions, :stream_entry, reblog: [:account, :mentions], thread: [:account, :mentions]) } + scope :with_includes, -> { includes(:account, :mentions, :stream_entry, reblog: [:account, :mentions], thread: :account) } def local? self.uri.nil? -- cgit