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

Ticket #10417 (closed enhancement: fixed)

Opened 9 months ago

Last modified 9 months ago

ActionController::Base.head() is too wordy

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

Description

ActionController::Base.head() is too wordy, it uses 10 lines of code for what could be done in 2, and still readable.

Also, raising an exception if the method is passed two parameters and the second one is not a hash does not seem overly helpful.

There are no new tests supplied with this patch (no new functionality either), however all existing Rails tests still pass after the change.

Attachments

action_controller_base_head.patch (1.1 kB) - added by ssoroka on 12/08/07 14:16:26.
patch, using extract_options!

Change History

(follow-up: ↓ 2 ) 12/07/07 21:10:03 changed by manfred

You might want to check out the extract_options method.

12/08/07 14:16:26 changed by ssoroka

  • attachment action_controller_base_head.patch added.

patch, using extract_options!

(in reply to: ↑ 1 ) 12/08/07 14:20:16 changed by ssoroka

Thanks! Updated

12/08/07 19:23:08 changed by rick

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

(In [8334]) Clean up some cruft around ActionController::Base#head. Closes #10417 [ssoroka]