AJAX Post to Rails controller with foreign key
===

I have 2 models:

<pre>
class Document
    has_many :citations
end

class Citations
    belongs_to :document
end
</pre>

How can I get the `document_id` on the client side to add to the object literal I am sending to the controller?

Example of the hash I am sending to the `create` method of the `CitationsController`:
<pre>
$.ajax({
    url: url,
    type: 'post',
    data: {
        citation: {
            document_id: //need this
            quote: 'quote'
        }
    }
});
</pre>

Thanks for the help!