Aaron Aaron - 9 months ago 45
HTML Question

Rails: Open link in a new page

I was wondering a way to open a link in a new tab. Here is the code I have so far:

<li><%= link_to "Pictures", pictures_path %></li>

I have researched ways to do this with
, but for some reason when I tried it, it did not work. Any help is greatly appreciated!

gen gen

Try it like this:

<li><%= link_to "Pictures", pictures_path, target: :_blank %></li>