views:

29

answers:

0

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 ActiveResource would make a call to:

myIssues.com/issues.xml?page=2

... but I don't actually know that. For all I know, ActiveResource could have decided it doesn't like the word "page", so it's actually using:

myIssues.com/issues.xml?mod_page=2

This makes debugging difficult. Right now I've got a situation where, if I go to the URL I think ActiveResource is using, it works just fine. However, when I actually use ActiveResource, it doesn't work. Seeing the URL it's GETing would be immensely helpful in this, so ...

Does anyone know a way to log (or otherwise output; if there's some resource.url method that would work great too) the URL(s) that ActiveResource uses to do its thing?