Non integer ID and rails with ActiveResource

I have been fighting with ActiveResource for the last couple of days. Here at work we are using this huge Object Cache to stuff data into. The front end is a rails app that talks to the cache through ActiveResource and REST. The issue I had was that the ID which was returned wasn’t an INT, the cache assigns a UUID as the id. The error kept saying it was in: /vendor/rails/actionpack/lib/action_controller/mime_responds.rb:163:in `respond’ Basicly the mimetype discovery for my controller is hosed with string id’s Broken: respond_to do |format| if @vendor.update_attributes(params[:vendor]) flash[:notice] = ‘Vendor was successfully updated.’ redirect_to edit_vendor_url(@vendor) format.html { redirect_to edit_vendor_url(@vendor) } format.xml { head :ok } else … end Once I changed it to: if @vendor.update_attributes(params[:vendor]) flash[:notice] = ‘Vendor was successfully updated.’ redirect_to edit_vendor_url(@vendor) else … end It worked just fine.

This entry was posted on Thu, 11 Jan 2007 22:26:00 GMT and Posted in . You can follow any any response to this entry through the Atom feed. You can leave a comment .


Comments

Leave a response

Leave a comment