This project is archived and is in readonly mode.

#1384 ✓resolved
sob

polymorphic_url should allow a symbol in place of a record

Reported by sob | November 16th, 2008 @ 06:20 AM | in 2.3.6

After #1317 was committed I found it necessary to send an array of symbols to polymorphic_url() such as:


polymorphic_path([:new, @project, @filter, :issue])

Expecting this to return new_project_issue_path(@project). Instead extract_namespace would empty the array and extract_record() would return nil.

I've patched extract_namespace() to skip the last record if it is a symbol and added a test.

Thanks,

sob

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>

Referenced by

Pages