| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Signed-off-by: Michael Koziarski <michael@koziarski.com>
|
|
|
|
|
|
| |
incorrect number of args
Signed-off-by: Carl Lerche <carllerche@mac.com>
|
| |
|
|
|
|
| |
Signed-off-by: Joshua Peek <josh@joshpeek.com>
|
|
|
|
| |
Signed-off-by: Joshua Peek <josh@joshpeek.com>
|
| |
|
| |
|
|
|
|
|
|
|
| |
Just a copy from Active Record (with tests). Each is a warpper function for
the equivalent scoped call to find eg first is a wrapper for find(:first)
Signed-off-by: Joshua Peek <josh@joshpeek.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Similar to Active Record - it will raise ActiveResouce::ResourceInvalid if
the resource is not valid (ie if <tt>valid?</tt> returns false)
However - does not raise ActiveResource::ResourceNotFound if the callbacks
fail (callbacks have not yet been implemented) - it will just try to save
and raise if the callbacks all fail.
This is not ideal behaviour - but will do until we decide to change the
behaviour of save_with_validations to actually raise (rather than catch) the
ResourceInvalid exception.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Record, and allows us to have one places where all find-tests are located, which will help when adding dynamic finders later.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
|
|
test directory structure.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
|