aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/search.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/search.rb b/app/models/search.rb
index 81a1c34..7823a74 100644
--- a/app/models/search.rb
+++ b/app/models/search.rb
@@ -59,9 +59,9 @@ class Search < ApplicationRecord
plain.each do |text|
res[:things] = if res[:things].any?
- res[:things].and(Thing.like(text:)).order('rate DESC, created_at')
+ res[:things].and(Thing.like(text:)).order('rate DESC, title, created_at')
else
- Thing.like(text:).order('rate DESC, created_at')
+ Thing.like(text:).order('rate DESC, title, created_at')
end
res[:comments] = if res[:comments].any?
res[:comments].and(Comment.like(text:)).order(:created_at)