This example assumes "merchant" is an instance of a Rails model class with RESTful routes. It creates a "Shop now" link that opens the merchant's page in a new tab or window and gives it the focus. Of course, this relies on JavaScript's being enabled in the user's browser.
<%= link_to "Shop now", merchant, onclick: "var w = window.open(this.href); w.focus(); return false;" %>
Nice information, valuable and excellent design, as share good stuff with good ideas and concepts, lots of great information and inspiration, both of which I need, thanks to offer such a helpful information here.
ReplyDeletepython internship | web development internship |internship for mechanical engineering students |mechanical engineering internships |java training in chennai |internship for 1st year engineering students |online internships for cse students |online internship for engineering students |internship for ece students|data science internships |