Reputation: 2227
I've been searching around for awhile and can't quite find what I'm looking for.
I would like to use the rails auto_link gem to scan for valid links in comments my users post, and link them out to a separate tab. Can anyone recommend a good resource on how I can achieve this with the aforementioned gem?
If I understand correctly auto_link would only be accessible in the view? Maybe, there is a better way to do what I want, any resources would be very helpful.
I'm using simple_form for users to post comments.
Upvotes: 0
Views: 108
Reputation: 172
Auto_link documentation should be a good place to start.
https://github.com/tenderlove/rails_autolink
I haven't used auto_link so I'm not sure if its only available in views, but even then why would it be a problem? Are you trying to save the link tag in a db?
Upvotes: 1