Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec helper support for prefixes? #49

Open
mbhnyc opened this issue Feb 25, 2013 · 6 comments
Open

Spec helper support for prefixes? #49

mbhnyc opened this issue Feb 25, 2013 · 6 comments

Comments

@mbhnyc
Copy link
Contributor

mbhnyc commented Feb 25, 2013

I'm sure this is on the list, but just in case, it doesn't seem possible to use a version prefix (even an optional one in a controller spec, I get a missing route error.

Or is there a way to construct the version that works?

@Sutto
Copy link
Owner

Sutto commented Feb 25, 2013

I'm not 100% sure I remember the intricacies of the version prefix code (this is one of the bits that I'd mentioned was an unknown / uncertainity) - but the idea is primarily your controller test doesn't need the prefix, only the normal version integer - the routes are the bits that care about that). That said, it should be possible to use one - So I'll take a look today.

@mbhnyc
Copy link
Contributor Author

mbhnyc commented Feb 25, 2013

Interesting — in my case, when I only have the integer in my controller test (using default_version 1) I get a route not found error.

@Sutto
Copy link
Owner

Sutto commented Feb 26, 2013

Would it be possible to get a cutdown example routes and spec?

On Mon, Feb 25, 2013 at 1:34 PM, mbhnyc [email protected] wrote:

Interesting — in my case, when I only have the integer in my controller test (using default_version 1) I get a route not found error.

Reply to this email directly or view it on GitHub:
#49 (comment)

@Sutto
Copy link
Owner

Sutto commented Feb 27, 2013

I spent a bit of time investigating this this morning and it appears the way we pass the version prefix information to the controller is the cause of the issue. Namely, we use the :default hash which appears to break url generation from parameters.

@mbhnyc
Copy link
Contributor Author

mbhnyc commented Feb 27, 2013

Nice! Sorry on a bit of a deadline and wasn't able to provide an example!

@Sutto
Copy link
Owner

Sutto commented Mar 3, 2013

No problem - apologies I haven't been able to fix it yet, I've not had much time to look deeply into the internals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants