ActiveResource RoutingError

I have the following

  • Edge Rails
  • Initial ActiveResource Checkin

class Company < ActiveResource::Base self.site = “http://localhost:3000/” end

this works c = Company.find(1)

when i try this

c.save

I get ActionController::RoutingError (no route found to match “/companies/.xml” with { :method=>:put}): /vendor/rails/actionpack/lib/action_controller/routing.rb:1250:in `recognize

_path’ /vendor/rails/actionpack/lib/action_controller/routing.rb:1240:in `recognize

The problem looks like an extra forward slash after companies, if so how can it?

Regards, Leon Leslie

c.save works if it is an update

if it is a new record I get the above routingerror.

regards, Leon.

changed /rails/activeresource/lib/active_resource/base.rb line 83 to read

  def update
    id? ? connection.put(self.class.element_path(id), to_xml) : connection.post(self.class.collection_path, to_xml)
  end

instead of

  def update
    connection.put(self.class.element_path(id), to_xml)
  end

and it works!!!