Merge pull request #3525 from BrokenEagle/fix-index-default-order

Fix index default order
This commit is contained in:
Albert Yi
2018-01-29 13:11:24 -08:00
committed by GitHub
49 changed files with 134 additions and 115 deletions

View File

@@ -45,7 +45,6 @@ class UserFeedback < ApplicationRecord
def search(params)
q = super
return q if params.blank?
if params[:user_id].present?
q = q.for_user(params[:user_id].to_i)
@@ -67,7 +66,7 @@ class UserFeedback < ApplicationRecord
q = q.where("category = ?", params[:category])
end
q
q.apply_default_order(params)
end
end