title: Passing parameters to methods in CakePHP
body: <p>I have the following method in my Posts Controller:</p>
  
  <pre><code>public function index( $filter = null )
  {
      debug($filter); exit;
  }
  </code></pre>
  
  <p>If I visit the following URL: <code>/posts/index/filter:test</code> it will return null but If I use <code>/posts/index/test</code> it will return test...</p>
  
  <p>I was under the impression that Cake treated passed parameters as named by default?</p>
  
  <p>I tried fixing this using a route like:</p>
  
  <p><code>Router::connect('/test', array('controller'=&gt;'posts','action'=&gt;'index','filter'=&gt;'test'));</code></p>
  
  <p>But it still came back as null! As though the filter doesn't get passed to the method...</p>
  
  <p>How do I fix this?</p>