link_to_remote in rails, problem pass :id
- by nakada
i have problem use link_to_remote
link_to_remote
document example say
link_to_remote "Delete this post", :update => "posts", :url => { :action => "destroy", :id => post.id }
this code make below html code
<a href="#" onclick="new Ajax.Updater('posts', '/blog/destroy/3', {asynchronous:true, evalScripts:true}); return false;">Delete this post</a>
but my app don't. my html is
<a href="#" onclick="new Ajax.Updater('posts', '/blog/6', {asynchronous:true, evalScripts:true, parameters:'authenticity_token=' + encodeURIComponent('2C4Yo8OIDN+dm9oieL37uRg++PuWa8LCz18gW5Cu+Vg=')}); return false;">Delete this post</a>
where is destroy in url?
i expected '/blog/destroy/6' but actually 'blog/6'
what's the problem?
my rails version is 2.3.5