Module: SearchApi::Helpers

Instance Method Summary collapse

Instance Method Details

#string_camelize(string) ⇒ Object



4
5
6
7
# File 'lib/searchapi/helpers.rb', line 4

def string_camelize( string )
  words = string.split( /[\s_\-]/ )
  words.map.with_index { | word, index | index.zero? ? word.downcase : word.capitalize }.join
end