Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Changeset [51f1f550dab47c6ec3dcdba7b153258e2a0feb69] by Jacques Crocker

Revision 51f1f550dab47c6ec3dcdba7b153258e2a0feb69, committed by Jacques Crocker · September 25th, 2010 @ 12:54 PM

Allow per Resource format settings

Previously, ActiveResource was using the connection level formatter for get requests. This made it impossible to use custom formatters per resource.

Additionally this commit makes the Connection request methods more consistent. It always returns a Response. The base will then decode it each the response using its format setting.

Merging this commit will allow users to add custom formatters on a per Resource basis. This enables handling pagination responses from the server side, a very common use case that was previously impossible without monkeypatching XmlFormat.

Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/51f1f550dab47c6ec3dcdba7b15325...

5 changed files

  • M activeresource/lib/active_resource/base.rb
  • M activeresource/lib/active_resource/connection.rb
  • M activeresource/lib/active_resource/custom_methods.rb
  • M activeresource/test/cases/authorization_test.rb
  • M activeresource/test/connection_test.rb