3
我正在尝试将我的link_to
标记转换为link_to do
块,如讨论here。我不确定:remote => true选项应该在哪里。Rails link_to用remote => block做block?
原文:
<%= link_to "Title", {:controller => "users", :action => "edit", :id => u.id }, :remote => true %>
到目前为止,这是工作的link_to do
块,但我不知道往哪里放:远程=>真。它在选项块或html_options中不起作用。
<%= link_to (options = {:controller => "users", :action => "edit", :id => u.id}) do %>
Link contents
<% end %>
你指出我在正确的方向!原来你关闭了url_for before:remote => true。谢谢,我会更新与什么对我有效的问题:) – user1436111 2013-04-25 02:46:55
@ user1436111相反,创建一个答案。答案不属于问题。另外,在':remote'之前关闭'url_for' * *。 – 2013-04-25 02:51:48