lib/searchlogic/named_scopes/ordering.rb in binarylogic-searchlogic-2.2.3 vs lib/searchlogic/named_scopes/ordering.rb in binarylogic-searchlogic-2.3.0

- old
+ new

@@ -1,20 +1,15 @@ module Searchlogic module NamedScopes - # Handles dynamically creating named scopes for orderin by columns. + # Handles dynamically creating named scopes for ordering by columns. Example: + # + # User.ascend_by_id + # User.descend_by_username + # + # See the README for a more detailed explanation. module Ordering def condition?(name) # :nodoc: super || ordering_condition?(name) - end - - def primary_condition_name(name) # :nodoc - if result = super - result - elsif ordering_condition?(name) - name.to_sym - else - nil - end end private def ordering_condition?(name) # :nodoc: !ordering_condition_details(name).nil? \ No newline at end of file