I have a text area into which users enter a lot of text that potentially includes hyperlinks. How can I display the text and have the URLs automatically appear as hyperlinks? Is there a gem, plugin, or existing method that does this? I’m looking to be able to do something like:
<%=h @my_object.description.with_links %> in my view.
I have a text area into which users enter a lot of text that
Share
Rails 4+
Auto-linking has been removed from Rails and has been made into the
rails_autolinkgem.Rails 3
Use the provided helper method called
auto_link, which is part of ActionView.