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

Ticket #10497 (closed enhancement: fixed)

Opened 9 months ago

Last modified 9 months ago

Add :delete and :put *_via_redirect methods to AC::Integration::Session

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

Description

ActionController::Integration::Session provides the :get_via_redirect and :post_via_redirect methods which follow any redirects after making the given request. This patch simply adds the corresponding :delete and :put methods. I needed these methods when adding a click_link("Log out", :delete) feature to webrat, and I see no reason for them not to exist alongside the others.

Attachments

add_integration_via_methods.patch (2.3 kB) - added by philodespotos on 12/13/07 17:24:47.
request_via_redirect.patch (5.5 kB) - added by philodespotos on 12/16/07 19:50:06.

Change History

12/13/07 17:24:22 changed by philodespotos

  • type changed from defect to enhancement.

12/13/07 17:24:47 changed by philodespotos

  • attachment add_integration_via_methods.patch added.

12/15/07 07:15:00 changed by evolving_jerk

+1

12/16/07 19:50:06 changed by philodespotos

  • attachment request_via_redirect.patch added.

12/16/07 19:52:23 changed by philodespotos

Attached new patch with generic :request_via_redirect method.

Broke the tests for it into smaller pieces, and then changed the :get_via_redirect etc. tests to simply assert that :request_via_redirect was called as expected.

12/17/07 00:39:23 changed by david

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

(In [8429]) Added delete_via_redirect and put_via_redirect to integration testing (closes #10497) [philodespotos]