format.js { render :update do |page| page.alert "foo!" end}
results in
NoMethodError (undefined method `html_safe' for ["alert(\"foo!
\");"]:Array):
from a discussion in rails-contrib (quote)
buhrmi: i replaced the the function in /lib/haml/util.rb starting with
line 215 with http://pastie.org/879571
-m
-hugo
On Mar 21, 2:29 pm, mz <m.ze...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "Haml" group.
To post to this group, send email to ha...@googlegroups.com.
To unsubscribe from this group, send email to haml+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.
any fix would be welcome.
to reproduce:
1) create a link_to @foo, :remote => true
2) create a js responder in the controller: format.js { render :update
do |p| p.reload end}
3) see the output in the patched and in the unpatched version.
i think since the javascript is on more than one line, it gets treated
as an array and thats why it fails.
i will try to research more on why this behavior is actually there -
but for now everything works with that patch in rails edge... will let
you know when i have more info!
greets,
parasew
--