Follow Along as I Stumble on the Path to Learning RoR

Opening Link in New Tab/Window with Rails link_to

If you want to have a link that opens in a new window and use ruby, all you need to do is add the option :target => ‘_blank’

for example:
<%= link_to “foo”, foo_path, :target => ‘_blank’ %>

Advertisements

Comments are closed.