Commit ca2b8839 authored by Mark Chao's avatar Mark Chao

Performance fix to eager load noteable

parent acad071c
......@@ -11,7 +11,7 @@ module EE
belongs_to :review, inverse_of: :notes
scope :searchable, -> { where(system: false) }
scope :searchable, -> { where(system: false).includes(:noteable) }
end
# Original method in Elastic::ApplicationSearch
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment