Displaying 1 result from an estimated 1 matches for "send_data_url".
2009 Jul 05
2
JSON data not decoded in Rails
...he browser to the server using
prototype without success. On the server side ActiveSupport::JSON.decode
isn''t decoding the data.
Here is the code:
Javacript:
<a href="#" onclick=''send();return false;''>click</a>
<script>
function send() {
var send_data_url = "/pages/change";
var json_parameters = $H({name: ''Violet'', occupation: ''character'', age:
25 }).toJSON();
new Ajax.Request(send_data_url, {
method: ''post'',
parameters: json_parameters,
contentType: ''application/json;...