I have to use an API that wants a single param containing a json string :
def function
data = params['data']
# Do thing with the json string data
#... More code
end
config.rb :
match "/thing" => "controller#function", :via => :post
I've searched and read the documentation, I can't seems to find a way how to do this. I've searched with form_for or form_tag function and this seems not possible. I've tried both approach using remote => true, but it does not do what I want.
I also tried to do this using jquery $.ajax but it sends parameters in json format and not a json string.
Is there any ways to do this?
Thank you