This is usually normal.
<%= link_to new_message_path, :class=> "you_class" do %> <i class="fa fa-envelope-o" aria-hidden="true" target="_blank"></i> <% end %>
PS any other html properties can be placed as id, class, etc. And they noticed: it is better to place everything in one line, for example:
<%= link_to new_message_path, :class=> "you_class" do %><i class="fa fa-envelope-o" aria-hidden="true" target="_blank"></i><% end %>
else it issues a character to the right, immediately after the icon.
Mulleone
source share