I need to remove <a>
tag from rails link_to
method. Here is current code and result:
<%= link_to "ESP", :locale=>'es'%>
<a href="/es/blog/crazy_page">ESP</p>
Here is my desired outcome:
/es/blog/crazy_page
Reason I need this is so I could make "alternate" link tag in header for each language. Can't seem to find this anywhere.
答案 0 :(得分:1)
使用url_for
方法
<%= url_for(:locale => 'es') %>