This project is archived and is in readonly mode.
Routing :defaults option is not passed through to params
-
José Valim
- Milestone cleared.
- Assigned user set to josh
-
josh
- State changed from new to wontfix
:defaults was sort of deprecated even in the old dsl.
match 'photos/:id' => 'photos#show', :format => 'jpg'should be the preferred dsl.
-
carl
Has the new DSL which Joshua Peek mentioned been added to the current beta of rails3? I can't seem to get it to work.
-
Henrique
Didn't get it to work either, that was the reason for the ticket. There is no way right now to pass parameters through the routes.
@carl do you tested against Rails edge?
-
Jeroen van Dijk
I haven't had the time to see if the suggested functionality works. I hope to do that soon, but this post of Yehuda describes the deprecated dsl (with :defaults), see http://www.railsdispatch.com/posts/rails-3-makes-life-better and search for ':defaults'
-
José Valim
It seems that support for it was added later. Please do investigate. :)
-
Jeroen van Dijk
I have reran the tests against master and everything works. Both with :defaults and without so Yehuda's post was not incorrect after all. After a 'git blame' I found #4265 [PATCH] Defaults support for the new Router DSL which resolves this issue, here is the specific commit: http://github.com/rails/rails/commit/3d746fcdb584767c476408f395320e...
In summary, this ticket can be closed.
