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"
精彩评论