summaryrefslogtreecommitdiff
path: root/modules/rest/controllers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-01-19 00:36:19 -0800
committerBharat Mediratta <bharat@menalto.com>2010-01-19 00:36:19 -0800
commiteea936877725b9d682dc9969d0904b886c095420 (patch)
treede575088e4ef55ad9b8ca96aaf80f6ba9fc185ce /modules/rest/controllers
parent2c0b0aaebca6ec1149585853d7d849d50bea4184 (diff)
Have the rest calls return an array and print it out in the
controller. This is a clearer workflow; controllers generate output, not helpers. It's also easier to test.
Diffstat (limited to 'modules/rest/controllers')
-rw-r--r--modules/rest/controllers/rest.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/rest/controllers/rest.php b/modules/rest/controllers/rest.php
index cac49740..a3e7313c 100644
--- a/modules/rest/controllers/rest.php
+++ b/modules/rest/controllers/rest.php
@@ -73,7 +73,7 @@ class Rest_Controller extends Controller {
}
try {
- print call_user_func(array($handler_class, $handler_method), $request);
+ print rest::reply(call_user_func(array($handler_class, $handler_method), $request));
} catch (ORM_Validation_Exception $e) {
foreach ($e->validation->errors() as $key => $value) {
$msgs[] = "$key: $value";