diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-08-21 17:43:32 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-08-21 17:43:32 -0300 |
commit | c57f94d73010f5efbfe4bc52df5fad48ebd0aaa3 (patch) | |
tree | 6496f7fd6897bddbbc3977bffeb39cdec9148f1f /activeresource/lib/active_resource/base.rb | |
parent | 0c6aed0a09e3a4f8cdf2b277f3144f715c0e30fb (diff) | |
parent | ce61a6bd551a96205892a125c8835c4bc69c4fad (diff) | |
download | rails-c57f94d73010f5efbfe4bc52df5fad48ebd0aaa3.tar.gz rails-c57f94d73010f5efbfe4bc52df5fad48ebd0aaa3.tar.bz2 rails-c57f94d73010f5efbfe4bc52df5fad48ebd0aaa3.zip |
Merge commit 'rails/master'
Diffstat (limited to 'activeresource/lib/active_resource/base.rb')
-rw-r--r-- | activeresource/lib/active_resource/base.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb index f27febb7ef..e5b8589fb3 100644 --- a/activeresource/lib/active_resource/base.rb +++ b/activeresource/lib/active_resource/base.rb @@ -611,6 +611,28 @@ module ActiveResource end end + + # A convenience wrapper for <tt>find(:first, *args)</tt>. You can pass + # in all the same arguments to this method as you can to + # <tt>find(:first)</tt>. + def first(*args) + find(:first, *args) + end + + # A convenience wrapper for <tt>find(:last, *args)</tt>. You can pass + # in all the same arguments to this method as you can to + # <tt>find(:last)</tt>. + def last(*args) + find(:last, *args) + end + + # This is an alias for find(:all). You can pass in all the same + # arguments to this method as you can to <tt>find(:all)</tt> + def all(*args) + find(:all, *args) + end + + # Deletes the resources with the ID in the +id+ parameter. # # ==== Options |