rails/rails — Issue #4138: Optional route globs eating up format
Author: Axsuul
Created: 2011-12-22 23:31:16+00:00
State: open

Not even sure if route globbing is suppose to be optional, but if I define a route as

```ruby
get 'posts/:id(/*filters)' => 'posts#show'
```

```
> Rails.application.routes.recognize_path("posts/4/foo/bar.js")
=> {:controller=>"posts", :action=>"show", :id="4", :filters=>"foo/bar.js"}
```

However, if I define the route as

```ruby
get 'posts/:id(/*filters)' => 'posts#show'
```

It gives me the expected params hash

```
> Rails.application.routes.recognize_path("posts/4/foo/bar.js")
=> {:controller=>"posts", :action=>"show", :id="4", :filters=>"foo/bar", :format=>"js"}
```

Is route globbing intended to *not* be optional?