Posting JSON via JQuery to Rails
===

I'm having a surprisingly tough time getting json to post from javascript to a rails backed web service.

Here is the jquery code;

    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script>
    var jsonPost = { 
          "email":"dummy@dummy.com",
          "token":"63uO6eEfLVBFpnZswzI",
          "content": "testcontent",
          "notification_type": "2",
          "name":"testname",
    }
      function callback(data){alert(data)};
    
    jQuery.ajax({
            type: "POST",
            url: 'http://localhost:3000/api/create.json',
            data: jsonPost,
            success: callback,
            dataType: "json",
            contentType: "application/json",
            processData: false
          });
    
    
    </script>


On the rails side:

    def api_create
      respond_to do |format|
        format.json {
          email = params[:email]
          token = params[:token]
          auto_action = params[:auto_action]

The rails side does recognize the request as JSON, but I see no data in the request when debugging in rails.

Could someone point me in the right direction?
