lib/scoped_from/query.rb in scoped_from-0.8.0 vs lib/scoped_from/query.rb in scoped_from-0.8.1
- old
+ new
@@ -108,11 +108,11 @@
@relation.column_names.include?(column) ? { column: column, direction: direction } : {}
end
def parse_orders(values)
[].tap do |orders|
- values.reverse.each do |value|
+ values.each do |value|
order = parse_order(value)
orders << order if order.present? && !orders.any? { |o| o[:column] == order[:column] }
end
end
end
@@ -125,6 +125,6 @@
TRUE_VALUES.include?(value.to_s.strip.downcase)
end
end
-end
\ No newline at end of file
+end