Merge pull request #2879 from evazion/fix-dead-code

Eliminate dead code
This commit is contained in:
Albert Yi
2017-02-07 13:56:05 -08:00
committed by GitHub
36 changed files with 1 additions and 285 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