The ability to have flash messages (notice, error, warning, etc) with embedded links is nice from a user interaction standpoint. However, embedding an anchor tag inside a flash message from the controller is dirty.
Let's assume that a flash message like this is good for usability*:
Example Flash Message Notice with an Embedded Link http://img.skitch.com/20090826-xbsa4tb3sjq4fig9nmatakthx3.png (borrowed from DailyMile.com)
What tactic would you take between the controller and view to employ something like this cleanly?
Just thought I would share this, since found answer I was looking for elsewhere:
Works on rails 3.1
flash[:notice] = "Proceed to #{view_context.link_to('login page', login_path)}".html_safe
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With