I have this piece of code which use Ajax to send data to server, how I can pass argument id in data which is in 'params', something in erb is like
id: <%= params[:id] %>
But I need it in haml
%script(type="text/javascript")
function send_data(){
$.ajax({
type: 'post',
url: '/create_comment',
data:{
comment: $('#comment_content').val(),
parent_type: 'project'
}
});
}