Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Allow a route to have :format => true #2263

Merged
merged 2 commits into from Jul 25, 2011

Conversation

Projects
None yet
3 participants
Contributor

sferik commented Jul 25, 2011

When :format => true, the format segment is mandatory (as opposed to :format => false).

Before this patch, it was not possible to specify a resource route with a mandatory format.

sferik added some commits Jul 25, 2011

@sferik sferik Allow a route to have :format => true
When format is true, it is mandatory (as opposed to :format => false).
This is currently not possible with resource routes, which automatically
make format optional by default.
c41ecd7
@sferik sferik Add documentation for :format => true 78d151d
Contributor

bcardarella commented Jul 25, 2011

Does this make sense for 3.1? It's already in release candiate, this should probably go to master

Contributor

sferik commented Jul 25, 2011

Sad face. If it has to wait until 3.2, I suppose it can wait.

I guess I'd argue it's a pretty obvious missing feature (i.e. the fact that you can say :format => false but not :format => true feels like a bug). Of course, the last thing I'd want to do is hinder the 3.1 release process.

To whoever gets to make the call: Just let me know what you want me to do. I'm happy to submit another pull request that applies to master.

Contributor

bcardarella commented Jul 25, 2011

Yeah, I hear you. It just feels dirty introducing new public api behavior in a RC cycle

Contributor

bcardarella commented Jul 25, 2011

pinging @tenderlove

Contributor

josevalim commented Jul 25, 2011

It is fine to go into 3-1-stable. @sferik, if this is not in master yet, please reopen that other pull request and ping me.

@josevalim josevalim added a commit that referenced this pull request Jul 25, 2011

@josevalim josevalim Merge pull request #2263 from sferik/format_true
Allow a route to have :format => true
19a3c9b

@josevalim josevalim merged commit 19a3c9b into rails:3-1-stable Jul 25, 2011

Contributor

bcardarella commented Jul 25, 2011

sweet :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment