Method: Ion::Indices::Sort#transform

Defined in:
lib/ion/indices/sort.rb

#transform(value) ⇒ Object

The function that the string passes thru before going to the db.



11
12
13
14
15
# File 'lib/ion/indices/sort.rb', line 11

def transform(value)
  str = value.to_s.downcase.strip
  str = str[4..-1]  if str[0..3] == "the "  # Remove articles from sorting
  str
end