activeresource

Remove .xml extension from ActiveResource request

Hi, I am trying to use ActiveResource to consume xml data from a third party API. I can use the RESTClient app to successfully authenticate and make requests. I coded my app and when I make a request I get a 404 error. I added: ActiveResource::Base.logger = Logger.new(STDERR) to my development.rb file and figured out the problem. Th...

Active Resource Nested Routes

Im currently trying to integrate with a third party API using active resource. Ive completed a large amount of the work but am struggling with a single nested resource. /company/:company_id/users/:id I can retrieve the users from the company using API::Company.find(124343).users but any subsequent changes to a user will not save. ...

How do you log the URL ActiveResource uses?

Rails ActiveResource is awesome ... except for one thing: as far as I can tell, there is no way to see what URL it is using behind the scenes. For instance, let's say I have an ActiveResource called Issue, for a webservice at myIssues.com/issues.xml. If I do: Issue.find(:all, :params => {:page => 2}) I would expect that ActiveResour...

Get a member URL action with ActiveResource

I have a route in my application that is like this: /deployments/:id/logs.json It is used to retrieve logs for a specific deployment. On my client code, based in ActiveResource I have this: logs = Deployment.find(deployment.id).get(:logs, opts) Where opts is some parameters that I send via query string. The problem with this code...

Maximum value of ActiveResource timeout

This is a bad thing to do but this temporary fix I want to push to production wants me to increase the timeout of ActiveResource. I've set it to 120 seconds. How much further can it go ? ...

A way to silence "warning: Object#type is deprecated; use Object#class"

I have an application that interacts with ActiveResource from a system I have no control of. It happens that the system sends me a JSON feed and one of the fields is called "type" and, everytime this model is serialized, I get this nasty exception. Since this is a CLI application, it's very annoying. Is there a way to silence this war...

Error using ActiveResource with Rails 3 and REST API

I have a REST API that I am trying to access using Rails 3.0.1 that returns: <Sessions> <Session> <Title>This is a sample title</Title> ...Misc </Session> <Session> <Title>Another Title</Title> ...Misc </Session> </Sessions> I have set up my session.rb class defined: class Session < ActiveResource::Base self...