DanielsV DanielsV - 1 month ago 4x
HTML Question

Remove <a> tag from rails "link_to" methdo

I need to remove

tag from rails
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:


Reason I need this is so I could make "alternate" link tag in header for each language. Can't seem to find this anywhere.


Use url_for method

<%= url_for(:locale => 'es') %>