This project is archived and is in readonly mode.
Calling html_safe on a heredoc stalls development server
Reported by Bruno Antunes | March 23rd, 2011 @ 05:23 PM
This helper works (in application_helper.rb):
def facebook_button(options={})
markup = ''
markup += "<a class=\"fb_button fb_button_medium\" href=\"#{options[:link]}\">"
markup += "<span class=\"fb_button_text\">#{options[:text]}</span>"
markup += "</a>"
markup.html_safe
end
But this makes the development server stall in a way that only a kill -9 closes it:
def facebook_button(options={})
<<-markup
<a class="fb_button fb_button_medium" href="#{options[:link]}">
<span class="fb_button_text">#{options[:text]}</span>
</a>
markup
markup.html_safe
end
I actually don't assign the heredoc :D but it shouldn't get stuck... right?
I'm on Arch Linux x86_64, using Rails 3.0.4 on REE 2011.03. I tried both WEBrick and Thin (1.2.8).
Thanks,
Bruno A.
Comments and changes to this ticket
-
Santiago Pastorino March 24th, 2011 @ 12:36 AM
- State changed from new to invalid
- Importance changed from to Low
You have to assign the heredoc to a var an call string methods on it.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>