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

Ticket #11088 (closed defect: fixed)

Opened 10 months ago

Last modified 10 months ago

[PATCH] Supporting render options for render :update and fixing render chain

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

Description

render :update doesn't support extra options such as:

render :update, :status => 404 do |page|
   # ...
end

However, documentation said that extra options are supported:

"All renders take the :status and :location options and turn them into headers. They can even be used together:"
  - http://api.rubyonrails.org/classes/ActionController/Base.html

When fixing this we found (thx Xavier Noria! :) an issue with the render chain in ActionController::Benchmarking. the ActionController::Benchmarking#render_with_benchmark signature is diferent to ActionController::Base#render and was consuming the { :status => 404 } hash and breaking the chain not providing it to the actual render.

This patch also fixes #9360

Attachments

fixing_render_chain_and_supporting_options_for_rjs_rendering.diff (5.1 kB) - added by ernesto.jimenez on 02/12/08 13:57:48.

Change History

02/12/08 13:57:48 changed by ernesto.jimenez

  • attachment fixing_render_chain_and_supporting_options_for_rjs_rendering.diff added.

02/12/08 14:41:46 changed by david.calavera

+1

02/12/08 17:03:11 changed by juanjo.bazan

+1 works fine for me

02/12/08 22:42:40 changed by nzkoz

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

(In [8862]) Make sure render :update support the options hash. Closes #11088 [ernesto.jimenez]