I need to convert a rails 2.3 site so that all external URLs open in a new window. I could go though every call to link_to and add :target => \'_blank\'>
link_to
:target => \'_blank\'>
In rails 3.2+, it has been added as an option, just add
= link_to 'facebook', 'http://www.facebook.com/fb-page', target: '_blank'
and it'll open the link in a new tab.