This project is archived and is in readonly mode.

#481 ✓committed
Luke Melia

Route optimisation adds hanging question mark when passed empty options hash

Reported by Luke Melia | June 25th, 2008 @ 04:05 AM

From a view, when calling something like

widget_path(5, {})

you get

/widgets/5?

but I want

/widgets/5

Attached is a patch that fixes the problem, but I haven't been able to figure out how to write a test for it. The test in the patch doesn't actually test the optimisation code -- it just verifies that the unoptimized version does not add the question mark.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Referenced by

Pages