summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2008-11-14 07:30:47 +0000
committerTim Almdal <tnalmdal@shaw.ca>2008-11-14 07:30:47 +0000
commitb5f48e4ab377e81d295226fe2eb51bfe9f023fe5 (patch)
tree7569b42628aa47de956fca7ee46741258d5afb8d
parent23869029266db567d654702d738f78077f480588 (diff)
Use the shortform to load the resource.
-rw-r--r--core/controllers/rest.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/controllers/rest.php b/core/controllers/rest.php
index f0a2b341..ff4d5120 100644
--- a/core/controllers/rest.php
+++ b/core/controllers/rest.php
@@ -55,7 +55,7 @@ abstract class REST_Controller extends Controller {
}
// @todo this needs security checks
- $resource = ORM::factory($this->resource_type)->where("id", $id)->find();
+ $resource = ORM::factory($this->resource_type, $id);
if (!$resource->loaded) {
return Kohana::show_404();
}