class Wallaby::Sorting::SingleBuilder
Generate sort param for only one field's next sort order (e.g. from empty to `asc`, from `asc` to `desc`, from `desc` to empty)
Protected Instance Methods
complete_sorting_str_with(field_name)
click to toggle source
@param field_name [String] field name @return [String] a sort order string, e.g. `'name asc'`
# File lib/services/wallaby/sorting/single_builder.rb, line 12 def complete_sorting_str_with(field_name) hash = {} current_sort = @hash[field_name] hash[field_name] = next_value_for current_sort rebuild_str_from hash end