aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/abstract_controller
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-11-22 10:31:47 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2009-11-22 10:31:47 -0800
commite68bc3f14ea93eabdd4274e66071b65debb5a0a8 (patch)
tree223c11f38dac1217d8e7e3cd427fdf6018975a9d /actionpack/lib/abstract_controller
parent3cb46b40a0df1a1f4912625cc2be40b3d630f1f3 (diff)
parente1935e3c0c35f8f1196239e2b1213c4436049fa5 (diff)
downloadrails-e68bc3f14ea93eabdd4274e66071b65debb5a0a8.tar.gz
rails-e68bc3f14ea93eabdd4274e66071b65debb5a0a8.tar.bz2
rails-e68bc3f14ea93eabdd4274e66071b65debb5a0a8.zip
Merge commit 'origin/master' into mail
Diffstat (limited to 'actionpack/lib/abstract_controller')
-rw-r--r--actionpack/lib/abstract_controller/layouts.rb2
-rw-r--r--actionpack/lib/abstract_controller/rendering_controller.rb6
2 files changed, 7 insertions, 1 deletions
diff --git a/actionpack/lib/abstract_controller/layouts.rb b/actionpack/lib/abstract_controller/layouts.rb
index 1616f8030a..c71cef42b2 100644
--- a/actionpack/lib/abstract_controller/layouts.rb
+++ b/actionpack/lib/abstract_controller/layouts.rb
@@ -100,7 +100,7 @@ module AbstractController
# name, return that string. Otherwise, use the superclass'
# layout (which might also be implied)
def _write_layout_method
- case @_layout
+ case defined?(@_layout) ? @_layout : nil
when String
self.class_eval %{def _layout(details) #{@_layout.inspect} end}
when Symbol
diff --git a/actionpack/lib/abstract_controller/rendering_controller.rb b/actionpack/lib/abstract_controller/rendering_controller.rb
index 0aae2b18e9..7054b9cf26 100644
--- a/actionpack/lib/abstract_controller/rendering_controller.rb
+++ b/actionpack/lib/abstract_controller/rendering_controller.rb
@@ -12,6 +12,12 @@ module AbstractController
self._view_paths ||= ActionView::PathSet.new
end
+ # Initialize controller with nil formats.
+ def initialize(*) #:nodoc:
+ @_formats = nil
+ super
+ end
+
# An instance of a view class. The default view class is ActionView::Base
#
# The view class must have the following methods: