Michael Satterwhite wrote:
> Philip Hallstrom wrote:
> 
>> def my_helper
>>   "<h2>my unsafe string</h2>".html_safe!
>> end
>> 
>> See http://weblog.rubyonrails.org/2009/10/12/what-s-new-in-edge-rails

Or you can use the raw method in the view I think:

<%= raw my_helper %>

Sort of like the opposite of the old "h" method.

> I'm not running edge rails, I'm running Rails 2.3.8.
> 
> There is no html_safe! method defined, so this won't work.

If you're not running Rails 3, and did not install the plugin for Rails 
2.3.x that does the automatic escaping they you are escaping it 
somewhere, maybe not realizing it.

Are you sure you're not wrapping the result in an "h" method?
-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to