# Render :update, error

**URL:** <https://www.ruby-forum.com/t/render-update-error/163804>\
**Category:** Rails\
**Created:** [March 25, 2009, 2:11am UTC](https://www.ruby-forum.com/t/render-update-error/163804 "2009-03-25T02:11:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abusiek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@abusiek](https://www.ruby-forum.com/u/abusiek)\
**Post date:** [March 25, 2009, 2:11am UTC](https://www.ruby-forum.com/t/render-update-error/163804/1 "2009-03-25T02:11:26Z")

</div>

Hi!

In my view i have remote\_form\_for and action in controller:

def save\_offer\_basics  
@offer = Offer.new params[:offer\_basics]  
@offer.user\_id = current\_user.id  
@offer.enable\_validation\_group :offer\_basic

```
render :update do |page|
  if @offer.valid?
   @offer.save
    flash[:notice] = 'Podstawowe dane oferty zosta³y zapisane!

```

Kolejnym krokiem jest wybranie kategorii.’  
page[:mdiv].replace\_html message\_block(:on =\> [:offer])  
page[:offer\_basics\_id].value = @offer.id  
else  
page[:mdiv].replace\_html message\_block(:on =\> [:offer])  
end  
page[:mdiv].show  
end  
end

Unfortunetly it never saves. When i debug code with netbeans it stops  
on line render :update do |page| with exception:

undefined method `class\_eval’ for  
#\<ActionView::Helpers::PrototypeHelper::JavaScriptGenerator:  
0xb5f0165c\>

with trace

```
<div id="Application-Trace" style="display: block;">
  <pre><code>vendor/plugins/validationgroup/lib/

```

validation\_group.rb:7:in `extended' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/helpers/ prototype_helper.rb:587:in`ext  
end’  
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action\_view/helpers/  
prototype\_helper.rb:587:in `inc lude_helpers_from_context' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/helpers/ prototype_helper.rb:586:in`eac  
h’  
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action\_view/helpers/  
prototype\_helper.rb:586:in `inc lude_helpers_from_context' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/helpers/ prototype_helper.rb:580:in`ini  
tialize’  
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action\_controller/  
base.rb:917:in `new' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/ base.rb:917:in`render\_with\_no\_la  
yout’  
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action\_controller/  
layout.rb:259:in `render_without_ benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/ benchmarking.rb:51:in`render’  
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active\_support/  
core\_ext/benchmark.rb:8:in `realt ime' /usr/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/ benchmarking.rb:51:in`render’  
app/controllers/offer/create\_controller.rb:31:in `save\_offer\_basics’

Thanks for any help 🙂

Adrian

---

<div class="post-metadata">

**Author:** ![abusiek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@abusiek](https://www.ruby-forum.com/u/abusiek)\
**Post date:** [March 25, 2009, 10:14am UTC](https://www.ruby-forum.com/t/render-update-error/163804/2 "2009-03-25T10:14:14Z")

</div>

On Mar 25, 1:10 am, abusiek [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ```
> <pre><code>vendor/plugins/validationgroup/lib/
> 
> ```
> 
> validation\_group.rb:7:in `extended’

This is some of your code (or a plugin you have installed). It’s been  
evaluated in the context of the javascript generator class and you to  
be careful in there because most methods that exist are undefined in  
there.

Fred
