Rendering of Javascript updates with Rails > 2.1

Hey,

i am currently upgrading a Rails 2.1 app to 2.3 to benefit from Rails
engines.

The app requires rendering javascript updates to strings, which does
not work
with 2.3 anymore:

data =
ActionView::Base.new(Rails::Configuration.new.view_path).render(:update)
do |page|
page[“div[id=‘foo’]”].removeClass(“bar”)
end

whihc results in an error because the @template variable is nil.

/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.12/lib/active_support/
whiny_nil.rb:52:in method_missing': undefined methodwith_output_buffer’ for nil:NilClass (NoMethodError)
from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.12/lib/action_view/
helpers/prototype_helper.rb:577:in initialize' from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.12/lib/action_view/ helpers/prototype_helper.rb:1029:innew’
from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.12/lib/action_view/
helpers/prototype_helper.rb:1029:in update_page' from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.12/lib/action_view/ base.rb:274:inrender’

I am not a rails intern and have problems to follow the @template
variable construction. Has anyone an idea of how to
get the code working again with 2.3?

Sebastian