From b85ea58eb561d0a0fd2b0a3dbae1dc7846961c2d Mon Sep 17 00:00:00 2001 From: Carlhuda Date: Mon, 1 Mar 2010 14:37:05 -0800 Subject: Change AV formats so they can delegate to the controller. Now users (or plugins) can override details_for_render in their controllers and add appropriate additional details. Now if only they could *do* something with those details... --- actionpack/lib/action_controller/metal/rendering.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller/metal') diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb index a026289ee5..6e5379745b 100644 --- a/actionpack/lib/action_controller/metal/rendering.rb +++ b/actionpack/lib/action_controller/metal/rendering.rb @@ -23,10 +23,14 @@ module ActionController def _render_partial(options) options[:partial] = action_name if options[:partial] == true - options[:_details] = {:formats => formats} + options[:_details] = details_for_render super end + def details_for_render + {:formats => formats} + end + def format_for_text formats.first end -- cgit v1.2.3