I'm using JQuery to post in a Sinatra application.
$.post("/addnewlistitem", $('#inputrow1').val(), function(data){alert(data);});
Haml looks like this:
%input{:type => "text", :id => "inputrow1", :name => "item", :class => "txt"}
And the ruby code, like this:
post '/addnewlistitem' do
@v = params[:item]
end
The problem is that I can't get the data posted from JQuery. Any ideas?