I am trying to pass an array of objects from js to rails
data.test = [{test: 'asdas'}]
$.ajax({
url: 'evaluate.json',
data: data,
success: function(data){
},
dataType : "json"
});
Rails
def evaluate
logger.info("#{params.test}")
end
Here the logger statement always gives me out put as
{"0"=>{"test"=>"asdas"}}
I am expecting the below log in rails.
[{:test=>"asdas"}]