rails/activeresource — pull request #23 by matthewcalebsmith (2012-04-26 00:17:31+00:00)
Title: Optionally yield the request response on find

I am not sure that I even like this proposed interface, but I am hoping it will start a conversation. This pull request allows you to pass an optional block to find, which will yield the response from a given request.

Example:

````ruby
Person.find(:all) do |response|
response # => Response from request
end
````

(While this may not be the silver bullet, there are other options out there.)

This idea surfaced when wanting to access headers on the response. It seems ActiveResource is strangely silent on this. One can easily set default headers for a resource, but the per request options don't seem as elegant as they could be either. I think this leads to the bigger question: Is ActiveRecord trying completely abstract away the request and the response?

And now that ActiveResource has been split off from Rails, what is the current plan for ActiveResource? Or is that being discovered as we speak?

A team I am working with is trying to decide whether or not to use ActiveResource on a project. If we do use it, we are hoping to make some contributions from the work we will be doing. Clearly though, the momentum and direction of ActiveResource will have a bearing on our choice.

I'd love to hear from the community on this!