<%= link_to(current_user) do %>
#show other stuff between anchors like this:
#<a href="/user/bob">show other stuff between anchors</a>
<% end %>
The error I get is:
compile error
syntax error, unexpected开发者_开发百科 ')'
...t(( link_to(current_user) do ).to_s); @output_buffer.concat ...
Why an unexpected ')'
?
Because the "=" at the beginning of the link_to tag implies "take what's in this tag and output it as a string" (hence the "to_s" in the error message).
精彩评论