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