1.8.6, Rails 2.0.2 on winxp. using webrick.
When I attempt to render RJS inline in the controller using
render :update, it fails horribly. none of the prototype helpers
work; each spits out the generated javascript to the screen. If i
call the same prototype function in a script tag in the view, sans
RJS, it works perfectly. I’ve ran rake to update the js and verified
the versions by hand, and starting now to trace this back through the
rails source. The only output to the client is the javascript; it
even has the correct content type in the headers.
could this be a bug somehow with the windows one-click packages? i
didn’t have any issues on my mac with 1.8.6 and 2.0.2. I know RJS is
finicky with syntax errors - this is a very isolated and standard
example on a new rails project. none of my RoR 1.2 code imported at
all from older projects, which were heavy on inline RJS.
Appreciate any insight.
#controller
class HomeController < ApplicationController
def index
render :update do |page|
page.insert_html :top, ‘test’ , “
end
end
#view
#layout
<%= stylesheet_link_tag 'home' %> <%= javascript_include_tag :defaults %> <%= yield :layout %>cheers
-isaac