lib/ransack/nodes/sort.rb in ransack-1.0.0 vs lib/ransack/nodes/sort.rb in ransack-1.1.0

- old
+ new

@@ -31,9 +31,10 @@ @name = name context.bind(self, name) unless name.blank? end def dir=(dir) + dir = dir.try(:downcase) @dir = %w(asc desc).include?(dir) ? dir : 'asc' end end end \ No newline at end of file