lib/couchrest/model/class_proxy.rb in couchrest_model-1.0.0.beta8 vs lib/couchrest/model/class_proxy.rb in couchrest_model-1.0.0

- old
+ new

@@ -73,9 +73,15 @@ doc = @klass.first({:database => @database}.merge(opts)) doc.database = @database if doc && doc.respond_to?(:database) doc end + def last(opts = {}) + doc = @klass.last({:database => @database}.merge(opts)) + doc.database = @database if doc && doc.respond_to?(:database) + doc + end + def get(id) doc = @klass.get(id, @database) doc.database = @database if doc && doc.respond_to?(:database) doc end