Render :update, error

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:inext
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:ineac
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:inini
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:inrender_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:inrender’
/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:inrender’
app/controllers/offer/create_controller.rb:31:in `save_offer_basics’

Thanks for any help :slight_smile:

Adrian

On Mar 25, 1:10 am, abusiek [email protected] 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