From 0ffa11b0e5b237aeccbc2c3dad549600ac8e4c77 Mon Sep 17 00:00:00 2001 From: Andrew Otto Date: Thu, 19 Apr 2012 14:15:08 -0400 Subject: [PATCH] server/controller.co - documentation for mapping property --- lib/server/controller.co | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/lib/server/controller.co b/lib/server/controller.co index 9187709..6ae94fa 100644 --- a/lib/server/controller.co +++ b/lib/server/controller.co @@ -42,6 +42,16 @@ class Controller extends Resource * for this sub-route. * - Object: Hash of HTTP-method (get, put, post, del, or all) to the name * of a method on this Controller. + * + * Example: + * { '/foo' => 'foo', + * '/bar' => {'get' => 'get_bar', 'del' => 'delete_bar' }, + * } + * If this mapping is in a controller with name 'nonya', then + * GET '/nonya/foo' -> NonyaController.foo(), + * GET '/nonya/bar' -> NonyaController.get_bar() + * DELETE '/nonya/bar' -> NonyaController.delete_bar() + * * @type Object */ mapping : null -- 1.7.0.4