Ruby on Rails Friday, October 29, 2010

Christian Fazzini wrote in post #957990:
> How can one do something similar to:
>
> redirect_to(:back, :notice => "Photo was successfully created. Click
> <a href='#{url_for artist_photo_path(@photo.artist, @photo)}'>here</a>
> to view it")
>
> The flash notice message is shown however, it shows: "Photo was
> successfully created. Click <a href='/artists/1/photos/39'>here</a> to
> view it". It displays the anchor element as a string instead of an
> html element

So don't escape the HTML! Easy.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment