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

Routing aliases bug with Prioritized Routes #1648

Closed
leemour opened this Issue Apr 7, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@leemour

leemour commented Apr 7, 2014

I'm matching a path with 2 aliases and low priority. In development, first alias becomes an array, consuming values for both. And second alias is assigned to the first value of that array.
My controller:

get '/:primary/:secondary', priority: :low do
  "#{params[:primary]}, #{params[:secondary]}"
end

When accessing localhost:3000/abc/def (in development), I get:

["abc", "def"], abc

I remove priority :

get '/:primary/:secondary' do
  "#{params[:primary]}, #{params[:secondary]}"
end

Now, when accessing localhost:3000/abc/def (in development), I get:

abc, def

But I don't get this bug in production.
With low priority, when accessing localhost:3000/abc/def (in production), I get:

abc, def
@namusyaka

This comment has been minimized.

Show comment
Hide comment
@namusyaka

namusyaka Apr 7, 2014

Member

Thank you for the thorough explanation.
I fixed the issue, could you please confirm?
Also, we're going to replace the new router, the issue does not occur with the new router.
You could try it in your project.

Member

namusyaka commented Apr 7, 2014

Thank you for the thorough explanation.
I fixed the issue, could you please confirm?
Also, we're going to replace the new router, the issue does not occur with the new router.
You could try it in your project.

@namusyaka namusyaka closed this in f0b989e Apr 8, 2014

ujifgc added a commit that referenced this issue Apr 8, 2014

Merge pull request #1650 from padrino/fix-prioritized-routes
Fix the issue that params is not set correctly, fixes #1648
@leemour

This comment has been minimized.

Show comment
Hide comment
@leemour

leemour Apr 8, 2014

I confirm, the issue is fixed. Thanks for a swift patch!

leemour commented Apr 8, 2014

I confirm, the issue is fixed. Thanks for a swift patch!

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