Module: Sort::FormattingHelper

Included in:
CurrentDirectionForHelper, NextDirectionForHelper
Defined in:
lib/action_set/helpers/sort/formatting_helper.rb

Instance Method Summary collapse

Instance Method Details

#ascending_str(format) ⇒ Object



5
6
7
8
9
# File 'lib/action_set/helpers/sort/formatting_helper.rb', line 5

def ascending_str(format)
  return 'asc' if format.to_s == 'short'

  'ascending'
end

#descending_str(format) ⇒ Object



11
12
13
14
15
# File 'lib/action_set/helpers/sort/formatting_helper.rb', line 11

def descending_str(format)
  return 'desc' if format.to_s == 'short'

  'descending'
end