When using link_to in Rails, I wanted to display it in a separate tab, so I implemented it, so I will leave it as a memo.
First, specify the character string to be displayed and the link destination URL with
<%= link_to "String", "Link URL" %>
target:: _ blank to display in a separate tab
<%= link_to "String", "Link URL", target: :_blank %>
Now you can open it in another tab. However, this has problems in terms of performance and security. .. ..
To avoid this problem, add
rel =" noopener noreferrer ".
<%= link_to "String", "Link URL", target: :_blank, rel: "noopener noreferrer" %>
Now you can open another tab with confidence.