/janitor_trials, /ip_bans: fix default ordering.

This commit is contained in:
evazion
2018-02-04 16:46:42 -06:00
parent dac095f318
commit f2a7d3c41a
3 changed files with 5 additions and 8 deletions

View File

@@ -18,14 +18,13 @@ class IpBan < ApplicationRecord
end
def self.search(params)
q = where("true")
return q if params.blank?
q = super
if params[:ip_addr].present?
q = q.where("ip_addr = ?", params[:ip_addr])
end
q
q.apply_default_order(params)
end
def self.query(user_ids)