Put a link in a flash[:notice]

Don't forget to add .html_safe at the end of the notice, if you're using Rails3. So it would say flash[:notice] = "Your message".html_safe


The @template instance variable is no longer available in Rails 3.

Instead you can use this in your controller:

flash[:notice] = "Successfully created #{view_context.link_to('product', @product)}.".html_safe

Hope this helps :)


I may be missing something obvious, but you should just be able to do

flash[:notice] = %Q[Created job number <a href="/jobs/list?job=#{update.id}">#{update.id}</a>]

and then just make sure you're not escaping the content of the flash when you display it in your view.