# Using link\_to in the controller, or, how do I embed a link i

**URL:** <https://www.ruby-forum.com/t/using-link-to-in-the-controller-or-how-do-i-embed-a-link-i/108555>\
**Category:** Rails\
**Created:** [July 4, 2007, 5:40pm UTC](https://www.ruby-forum.com/t/using-link-to-in-the-controller-or-how-do-i-embed-a-link-i/108555 "2007-07-04T17:40:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spence\_Akiri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/45deac/32.png) [@Spence\_Akiri](https://www.ruby-forum.com/u/Spence_Akiri)\
**Post date:** [July 4, 2007, 5:40pm UTC](https://www.ruby-forum.com/t/using-link-to-in-the-controller-or-how-do-i-embed-a-link-i/108555/1 "2007-07-04T17:40:27Z")

</div>

For things like flash[:etc], and other dynamic text sent from the  
controller, how do you embed links?

I’ve currently fallen back on actually embedding HTML, but as routes  
may change, this doesn’t seem like a good practice.

An example of what I’m doing now:  
flash[:notice] = “#{@var} added! To remove, see your #{settings}.”

Is there any way to use some kind of link\_to here?
