split string for rails rest service