diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-11-11 13:11:20 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-11-11 13:11:20 +0000 |
commit | a15c7cb11fbf3a45492cf7cb0a04823d4321f3d5 (patch) | |
tree | 10379a7c0f053a80dc960ddfdde6555258d84d6d | |
parent | ee413f5f39e1a172b48a1264b1d75b7f6986979d (diff) |
Change the PUT/DELETE tunneling param from __action to _method
to be like Rails.
-rw-r--r-- | core/controllers/rest.php | 2 | ||||
-rw-r--r-- | core/views/welcome.html.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/controllers/rest.php b/core/controllers/rest.php index f307f86a..f0a2b341 100644 --- a/core/controllers/rest.php +++ b/core/controllers/rest.php @@ -74,7 +74,7 @@ abstract class REST_Controller extends Controller { return; } - switch ($this->input->post("__action")) { + switch ($this->input->post("_method")) { case "put": return $this->_put($resource); diff --git a/core/views/welcome.html.php b/core/views/welcome.html.php index f22f0b75..1180f475 100644 --- a/core/views/welcome.html.php +++ b/core/views/welcome.html.php @@ -186,7 +186,7 @@ <input type="submit" value="upload"/> <input id="photo_upload" name="file[]" type="file"/> <input type="hidden" name="type" value="photo"/> - <input type="hidden" name="__action" value="put"/> + <input type="hidden" name="_method" value="put"/> </form> </fieldset> <fieldset> @@ -195,7 +195,7 @@ <input type="submit" value="create"/> <input type="text" name="name"/> <input type="hidden" name="type" value="album"/> - <input type="hidden" name="__action" value="put"/> + <input type="hidden" name="_method" value="put"/> </form> </fieldset> </div> |