about summary refs log tree commit diff
path: root/app/models/status.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-03-25 15:09:40 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-03-25 15:09:40 +0100
commit318886287b289a8caccf19102da8584453ef7faa (patch)
treeb3cf78d9c9b52c750aa3539072158fc49081c9e6 /app/models/status.rb
parent36f3da3cde2bc2148e156a5dd09d732a06b44ddd (diff)
Fixing some stuff for Turbolinks, adding gzip on top, fixing a n+1 query
Diffstat (limited to 'app/models/status.rb')
-rw-r--r--app/models/status.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index 59c94aaca..439cd3053 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, reblog: [:account, :mentions], thread: [:account, :mentions]) }
+  scope :with_includes, -> { includes(:account, :mentions, :stream_entry, reblog: [:account, :mentions], thread: [:account, :mentions]) }
 
   def local?
     self.uri.nil?