How do I defined a variable link_to to an external URL

后端 未结 7 572
名媛妹妹
名媛妹妹 2020-12-09 07:58

On my site a user has a personal profile with a link to his personal external website. The url of the sites I store in a postgresql database under the name website

相关标签:
7条回答
  • 2020-12-09 08:34

    You can try with this below code:

    <%= link_to "your label", "your link with http", :target => "_blank" %>

    This will create a link that opens in a new tab.

    0 讨论(0)
提交回复
热议问题