Making links an active URL?

59 Views Asked by At

I currently have a user input a URL link, which is stored inside content.

When I display the given page, the links are highlighted similar to a link, but do not actually redirect the user to the URL.

Is there any helper method available in Ruby that can do this?

<% @microposts.each do |micropost| %>
  <tr>
    <td><%= url_for link_to micropost.content,  %></td>
  </tr>
<% end %>
1

There are 1 best solutions below

1
On BEST ANSWER

You're just showing the link. If you want to make a link:

<td><%= link_to('link', url_for(micropost.content)) %></td>