From e274eb1df1dcf526febb7c3a1a8dc2c02325d68c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 26 Jan 2010 16:34:25 +0100 Subject: Bring layouts with proc back alive. --- actionpack/lib/abstract_controller/layouts.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'actionpack/lib/abstract_controller/layouts.rb') diff --git a/actionpack/lib/abstract_controller/layouts.rb b/actionpack/lib/abstract_controller/layouts.rb index 6fbf6bc392..56ddf9bf01 100644 --- a/actionpack/lib/abstract_controller/layouts.rb +++ b/actionpack/lib/abstract_controller/layouts.rb @@ -270,6 +270,9 @@ module AbstractController end end ruby_eval + when Proc + define_method :_layout_from_proc, &@_layout + self.class_eval %{def _layout(details) _layout_from_proc(self) end} when false self.class_eval %{def _layout(details) end} when true -- cgit v1.2.3