开发者

button_to_remote :html => {}

开发者 https://www.devze.com 2022-12-16 11:20 出处:网络
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 w

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

精彩评论

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