This project is archived and is in readonly mode.

Changeset [4dc05bc8a9824b9404cebecaba28f9f248f9995e] by taryn

August 19th, 2009 @ 03:04 PM

Swallow ResourceNotFound error on find_every

Active Record does not explode with RecordNotFound if you go looking for a collection of objects - it just returns nil. Thus Active Resource should also not explode.

After all - finding no objects that match a set of conditions is not exceptional behaviour - unlike looking for a specific object with a given id (which you'd expect to exist).

I've also added documentation to +find+ to reflect this.

Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...

Committed by taryn

  • M activeresource/lib/active_resource/base.rb
  • M activeresource/test/cases/finder_test.rb

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>