Hi all,
some information first: I am using rails 2.3.4 on ruby 1.8.7 and I
migrated my rails app to a new Server (old server with the same rails
and ruby versions). The app uses some RJS for data manipulating and it
worked fine on the old server.
Now I am getting errors like that:
ArgumentError (Callbacks must be a symbol denoting the method to call, a
string to be evaluated, a block to be invoked, or an object responding
to the callback method.):
app/controllers/orderpositions_controller.rb:68:in update' app/controllers/orderpositions_controller.rb:67:in
update’
The code in my controller is:
def update
@orderposition = Orderposition.find(params[:id])
respond_to do |format|
if @orderposition.update_attributes(params[:orderposition]) //the
error comes here!
flash[:notice] = ‘Orderposition was successfully updated.’
format.html { redirect_to(@orderposition.order) }
format.xml { head :ok }
format.js
else
format.html { render :action => “edit” }
format.xml { render :xml => @orderposition.errors, :status =>
:unprocessable_entity }
format.js
end
end
end
The corresponding view code is:
<% remote_form_for (@orderposition), :url => {:controller =>
“orderpositions”, :action => new_form ? “create” :
@orderposition.id.to_s, :method => new_form ? “post” : “put”} do |f| %>
…
<% end %>
I searched all the web for possible reasons, but could not find anything
useful. Hopefully you have some hints for me. If you need more
information or code, just ask.
Thanks a lot for your help.
Christoph