Forum: Ruby on Rails Solved: RJS Templates Not automatically evaluating

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Jeremy H. (Guest)
on 2006-03-27 19:37
(Received via mailing list)
I had posted a question here and on IRC about an issue I had with RJS
templates not automatically evaluating (I had to put my own
eval(response.responseText) in an :complete).

The issue was that the content type was not being set to
text/javascript, because I was explicitly setting content-type in a
before_filter in my application.rb. I had put that line in a long time
ago to make like my xhtml strict and forgotten about it,
and didn't quite realize how the auto-evaluation magic of prototype
worked (and still don't to be honest).

I guess I am a little confused why the content-type wouldn't be
overwritten when the template is rendered but I won't worry about it.
Maybe this will help someone else.

Jeremy H.
This topic is locked and can not be replied to.