Permalink
Browse files

Add conventional aliases for find method

(first, last, all, etc.)
  • Loading branch information...
Ryan Closner
Ryan Closner committed Jul 13, 2011
1 parent 0003984 commit 1e9a5d3cfb760cc4e2551e65473d5a87fbb6499b
Showing with 13 additions and 1 deletion.
  1. +13 −1 lib/basecamp/resource.rb
View
@@ -23,9 +23,21 @@ def prefix(options = {})
'/'
end
end
+
+ def all(options = {})
+ find(:all, options)
+ end
+
+ def first(options = {})
+ find(:first, options)
+ end
+
+ def last(options = {})
+ find(:last, options)
+ end
end
def prefix_options
id ? {} : super
end
-end; end
+end; end

0 comments on commit 1e9a5d3

Please sign in to comment.