i am working on a rails blog app, and i need to add user tags on post. example i write and post the following; 'my dogs name is john. #dogs' i want dogs to be clickable text on that post. how do i display a clickable #dogs text on view to a route /dogs. on a regular views page we just use a link_to helper, how can i use that or anything else to do so
Asked
Active
Viewed 131 times
1 Answers
0
You could write a view helper and pass the text into that view helper. The View helper can parse the text using regular expressions and replace the results with a link.

Markus Graf
- 533
- 3
- 16