Ruby on rails 为什么不起作用:link_to(当前_用户)do
为什么会出现意外情况?因为link\u to标记开头的=意味着获取此标记中的内容并将其作为字符串输出,因此错误消息中的to也是如此。因为link\u to标记开头的=意味着获取此标记中的内容并将其作为字符串输出,因此错误消息中的to是正确的,你只需要去掉=就可以了。没错,你只需要去掉=就可以了。Ruby on rails 为什么不起作用:link_to(当前_用户)do,ruby-on-rails,Ruby On Rails,为什么会出现意外情况?因为link\u to标记开头的=意味着获取此标记中的内容并将其作为字符串输出,因此错误消息中的to也是如此。因为link\u to标记开头的=意味着获取此标记中的内容并将其作为字符串输出,因此错误消息中的to是正确的,你只需要去掉=就可以了。没错,你只需要去掉=就可以了。 <%= link_to(current_user) do %> #show other stuff between anchors like this: #<a href="/
<%= link_to(current_user) do %>
#show other stuff between anchors like this:
#<a href="/user/bob">show other stuff between anchors</a>
<% end %>
compile error
syntax error, unexpected ')'
...t(( link_to(current_user) do ).to_s); @output_buffer.concat ...