Remove unused arbitrary_sql_order_clause.

Unused since f87c71c.
This commit is contained in:
evazion
2017-02-06 17:41:37 -06:00
parent cf54cd1480
commit 951e6d4b5f
2 changed files with 0 additions and 30 deletions

View File

@@ -39,19 +39,5 @@ module PostSets
def presenter
raise NotImplementedError
end
def arbitrary_sql_order_clause(ids, table_name)
if ids.empty?
return "#{table_name}.id desc"
end
conditions = []
ids.each_with_index do |x, n|
conditions << "when #{x} then #{n}"
end
"case #{table_name}.id " + conditions.join(" ") + " end"
end
end
end

View File

@@ -33,22 +33,6 @@ module Danbooru
connection.__send__(method_name, sanitize_sql_array([sql, *params]))
end
end
def arbitrary_sql_order_clause(ids, table_name = nil)
table_name = self.class.table_name if table_name.nil?
if ids.empty?
return "#{table_name}.id desc"
end
conditions = []
ids.each_with_index do |x, n|
conditions << "when #{x} then #{n}"
end
"case #{table_name}.id " + conditions.join(" ") + " end"
end
end
end
end