Browse files

When using Backbone.js and Backbone.emulateHTTP = true, the _method v…

…ariable is all caps so must be lower-cased to work here.
  • Loading branch information...
1 parent 6f9d27b commit 59f1d077bf8559cab26bcab8c0513806ff9595c1 @cnanney cnanney committed Jan 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 application/libraries/REST_Controller.php
View
2 application/libraries/REST_Controller.php
@@ -406,7 +406,7 @@ protected function _detect_method()
if ($this->config->item('enable_emulate_request') && $this->input->post('_method'))
{
- $method = $this->input->post('_method');
+ $method = strtolower($this->input->post('_method'));
}
if (in_array($method, array('get', 'delete', 'post', 'put')))

0 comments on commit 59f1d07

Please sign in to comment.