Using ruby array in Ajax call

Im trying to pass a ruby array (@search_params) to the server but the
returned array is always empty even though it contains data in the view.
Can someone please tell me what im doing wrong

Add to search