S0RIEN/DataGridBundle — Issue #53: Filter redirection doesn't handle route parameters.
Author: ethanhann
Created: 2011-11-15 19:10:09+00:00
State: open

If I remove the id parameter from the route and the indexAction function the grid renders without an error.

URL: http://localhost/proj/app_dev.php/default/1

Route:

```yaml
AcmeTestBundle_default:
pattern: /default/{id}
defaults: { _controller: AcmeTestBundle:Default:index }
```

Controller:

```php
namespace Acme\TestBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sorien\DataGridBundle\Grid\Source\Entity;

class DefaultController extends Controller
{
public function indexAction($id)
{
$source = new Entity('AcmeTestBundle:Sample');
$grid = $this->get('grid');
$grid->setSource($source);
return $this->render('AcmeTestBundle::test.html.twig', array('data' => $grid));
}
}
```

Template:

```twig
{{ grid(data) }}
```