From ffd8d753f171a33cb0f8dadaff7fc5ba12b8f6b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 8 Mar 2010 02:04:18 +0100 Subject: Move layout lookup to views. --- actionpack/lib/abstract_controller/rendering.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/abstract_controller/rendering.rb') diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb index df33e8b480..8125badc75 100644 --- a/actionpack/lib/abstract_controller/rendering.rb +++ b/actionpack/lib/abstract_controller/rendering.rb @@ -15,10 +15,12 @@ module AbstractController included do class_attribute :_view_paths - delegate :_view_paths, :to => :'self.class' self._view_paths = ActionView::PathSet.new end + delegate :formats, :formats=, :to => :template_lookup + delegate :_view_paths, :to => :'self.class' + # An instance of a view class. The default view class is ActionView::Base # # The view class must have the following methods: @@ -180,11 +182,11 @@ module AbstractController end def details_for_render - { :formats => formats, :locale => [I18n.locale] } + { } end def _normalize_details(options) - details = details_for_render + details = template_lookup.details details[:formats] = Array(options[:format]) if options[:format] details[:locale] = Array(options[:locale]) if options[:locale] details -- cgit v1.2.3