-
Notifications
You must be signed in to change notification settings - Fork 508
-
Notifications
You must be signed in to change notification settings - Fork 508
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
regex routes are breaking redirection and 'rake routes' #672
Comments
Hm just thought, redirecting to routes that are defined as regex makes no sense :) Thanks Marc |
@joshbuddy, what about? |
I am not sure I can recommend in good conscience using the named route syntax with a regular expression. What would you need to refer to the regex using a symbol (considering you cant redirect to it). I feel like it is better off with:
What do you guys think? |
@nesquena Sounds good to throw the route name on regex routes away, as it is stupid to redirect to these. If this should be the common behaviour, we do not need to fix Thanks so far. |
Mmm, if Im not wrong (we need to make a spec) shouldn't work, because you are inside a controller, and it prepend "/base/" to their route. Maybe should work if defined directly inside app. This can be the best way to prevent problems. I think @joshbuddy has the right answer. |
Moving to 0.10.4 because seems like a minor issue (and I want to try and prepare for 0.10.3) |
I'll take a look at this. |
Regexp route generation in 98ce668 |
Rake routes fixed in aaad729 |
Awesome, thanks. |
Hi,
under 0.10.2, Ruby 1.9.3 running
results in
I have a route that uses a regex:
To fix the problem, I had to change
#L109 of mounter.rb
to
Another problem is redirection with regex routes. Let's take this controller:
Running
rake routes
gives me:So redirection with:
fails, as the name
base
of the controller is omitted.What am I doing wrong?
Thanks Marc
The text was updated successfully, but these errors were encountered: