Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #8720 (closed defect: fixed)

Opened 1 year ago

Last modified 10 months ago

[PATCH] polymorphic_path accepts an options hash, like polymorphic_url

Reported by: gbuesing Assigned to: core
Priority: normal Milestone: 2.x
Component: ActionPack Version: edge
Severity: normal Keywords:
Cc:

Description

Currently, polymorphic_path doesn't accept an options hash, like polymorphic_url. This means when you try to do this:

polymorphic_path(@article, :action => 'new')

... you get an ArgumentError. This patch fixes polymorphic_path so that it accepts an options hash.

Tests included.

Attachments

polymorphic_path_accepts_options_hash.diff (1.4 kB) - added by gbuesing on 06/22/07 06:58:51.

Change History

06/22/07 06:58:51 changed by gbuesing

  • attachment polymorphic_path_accepts_options_hash.diff added.

06/22/07 07:05:33 changed by gbuesing

.. or I should say, polymorphic_path doesn't accept an options hash, *unlike* polymorphic_url, which *does* accept an options hash.

06/22/07 18:37:10 changed by matt

01/27/08 01:18:50 changed by nzkoz

  • status changed from new to closed.
  • resolution set to fixed.

(In [8741]) Add documentation for polymorphic URL helpers, make API consistent for polymorphic_path and polymorphic_url.

Closes #10883 [mislav] Closes #8782 [gbuesing] Closes #8720 [gbuesing]

02/10/08 01:14:13 changed by nzkoz

(In [8844]) 2-0-stable: Add documentation for polymorphic URL helpers, make API consistent for polymorphic_path and polymorphic_url.

References #10883 [mislav] References #8782 [gbuesing] References #8720 [gbuesing]

Merging [8741]