def flash_messages
%w(notice warning error).each do |msg|
concat content_tag(:div, content_tag(:p, flash[msg.to_sym]),
:class => "message #{msg}") unless flash[msg.to_sym].blank?
end
end
in the layout: <% flash_messages %>
On 17 aug, 04:56, Bharat Ruparel <[email protected]> wrote:
> Sorry,
> Did not ask my question properly. You are right, Rails 3 is safe by
> default.
>
> What I meant to ask is how do I fix the method shown above so that the
> rendered HTML is not escaped and therefore displays properly?
> Thanks.
> Bharat
> --
> Posted viahttp://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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.