aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal
diff options
context:
space:
mode:
authorCarlhuda <carlhuda@engineyard.com>2010-03-01 14:37:05 -0800
committerCarlhuda <carlhuda@engineyard.com>2010-03-01 14:37:05 -0800
commitb85ea58eb561d0a0fd2b0a3dbae1dc7846961c2d (patch)
treecd6aff630ea6d1ebcbfde508fb35b8b4a1d8118b /actionpack/lib/action_controller/metal
parent8fbbdda52634991b047b7567fe3a8ec7c9a6c558 (diff)
downloadrails-b85ea58eb561d0a0fd2b0a3dbae1dc7846961c2d.tar.gz
rails-b85ea58eb561d0a0fd2b0a3dbae1dc7846961c2d.tar.bz2
rails-b85ea58eb561d0a0fd2b0a3dbae1dc7846961c2d.zip
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...
Diffstat (limited to 'actionpack/lib/action_controller/metal')
-rw-r--r--actionpack/lib/action_controller/metal/rendering.rb6
1 files changed, 5 insertions, 1 deletions
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