diff --git a/lib/ransack/visitor.rb b/lib/ransack/visitor.rb index 2a405cf79..f066049d6 100644 --- a/lib/ransack/visitor.rb +++ b/lib/ransack/visitor.rb @@ -40,15 +40,6 @@ def visit_or(object) end end - def visit_Ransack_Nodes_Sort(object) - return unless object.valid? - if object.attr.is_a? Arel::Attributes::Attribute - object.attr.send(object.dir) - else - ordered object - end - end - def quoted?(object) raise "not implemented" end @@ -62,16 +53,5 @@ def visit(object) klass.name.gsub(Constants::TWO_COLONS, Constants::UNDERSCORE) }" end - - private - - def ordered(object) - case object.dir - when 'asc'.freeze - Arel::Nodes::Ascending.new(object.attr) - when 'desc'.freeze - Arel::Nodes::Descending.new(object.attr) - end - end end end