开发者

button_to_remote :html => {}

Greetings,

I am try开发者_Python百科ing to get a button to generate with id="view-blog-1-comments" and it seems the button_to_remote function is ignoring my call. Could some one set me straight on what I am doing wrong here.

blog_comments_path(blog), :html => {:id => "view-blog-#{blog.id}-comments"}, :method => :get %>

Thanks in advance!


button_to_remote(name, options = {}, html_options = {})

is the method signature, so you need to rearrange your syntax to this:

button_to_remote 'View Comments', :url => blog_comments_path(blog), {:method => :get}, :id => "view-blog-#{blog.id}-comments"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜