title: Method Not Allowed on $this->request->allowMethod(['post', 'delete']);
body: <p>I was following <a href="http://book.cakephp.org/3.0/en/tutorials-and-examples/blog/part-two.html#deleting-articles" rel="nofollow">this tutroial</a> and everything is working fine, except the Deleting Articles. When I'm calling delete method:</p>
  
  <pre><code>public function delete($id)
      {
          $this-&gt;request-&gt;allowMethod(['post', 'delete']);
  
          $job = $this-&gt;Jobs-&gt;get($id);
          if ($this-&gt;Jobs-&gt;delete($job)) {
              $this-&gt;Flash-&gt;success(__('Job: {0} has been deleted.', h($job-&gt;name)));
              return $this-&gt;redirect(['action' =&gt; 'index']);
          }
      }
  </code></pre>
  
  <p>I have this error:</p>
  
  <blockquote>
    <p><strong>Method Not Allowed</strong>: $this->request->allowMethod(['post', 'delete']);</p>
  </blockquote>
  
  <p>But if i remove this line from my method, it works:</p>
  
  <pre><code>$this-&gt;request-&gt;allowMethod(['post', 'delete']);
  </code></pre>
  
  <p>So what am I doing wrong, and what I'm missing, why in the tutorial it works with this, but in my case it doesn't. Should I additionally allow something?</p>
  
  <blockquote>
    <p>Here is php code of the action:</p>
  </blockquote>
  
  <pre><code>echo $this-&gt;Html-&gt;link('Delete',    array('controller' =&gt; 'Jobs','action' =&gt; 'delete', $job-&gt;id),
                                      array('confirm' =&gt; 'Are You Sure?','class' =&gt; 'button red'));
  </code></pre>
  
  <blockquote>
    <p>Here is html code of the action:</p>
  </blockquote>
  
  <pre><code>&lt;a href="/jobsfind/jobs/delete/32" class="button red" onclick="if (confirm(&amp;quot;Are You Sure?&amp;quot;)) { return true; } return false;"&gt;Delete&lt;/a&gt;
  </code></pre>