class Ransack::Helpers::FormHelper::SortLink
def parse_sort(field)
def parse_sort(field) attr_name, new_dir = field.to_s.split(/\s+/) if no_sort_direction_specified?(new_dir) new_dir = detect_previous_sort_direction_and_invert_it(attr_name) end "#{attr_name} #{new_dir}" end