Forum: Ruby on Rails code open the external links in new tab, or new window

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
11bbca99cea0c2f3de8cd6de4d20e2d9?d=identicon&s=25 Santosh Turamari (santuhvr)
on 2009-04-10 09:58
Hi all,
 I have a problem to open an add in my app in new tab, it is opening in
the same tab of my site.

in my view I have added
<%= show_industry_sponsor(@community.industry) %>

and in application_helper.rb
def show_industry_sponsor(industry)

     return "<a href='http://www.someurl.com'
onclick='window.open(this.href,'_blank');return false;' ><img
src='http://jobeehive.com/images/industry_sponsors/somu...
title='aaaaaa' /></a>"


end


please help me out.. its urgent.
This topic is locked and can not be replied to.