aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/new_base/layouts.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-05-07 10:45:29 -0500
committerJoshua Peek <josh@joshpeek.com>2009-05-07 10:45:29 -0500
commita747ab5b20b9d543e9d311070e3b720c761ae716 (patch)
treec8e671f1f6a722b56d5ca005977fbe2e210ffda5 /actionpack/lib/action_controller/new_base/layouts.rb
parentaf40fa6d036d86895e7be4ef46a615d44eb41ede (diff)
downloadrails-a747ab5b20b9d543e9d311070e3b720c761ae716.tar.gz
rails-a747ab5b20b9d543e9d311070e3b720c761ae716.tar.bz2
rails-a747ab5b20b9d543e9d311070e3b720c761ae716.zip
Whitespace!
Diffstat (limited to 'actionpack/lib/action_controller/new_base/layouts.rb')
-rw-r--r--actionpack/lib/action_controller/new_base/layouts.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/actionpack/lib/action_controller/new_base/layouts.rb b/actionpack/lib/action_controller/new_base/layouts.rb
index 89d24fe92d..228162421d 100644
--- a/actionpack/lib/action_controller/new_base/layouts.rb
+++ b/actionpack/lib/action_controller/new_base/layouts.rb
@@ -4,13 +4,13 @@ module ActionController
depends_on ActionController::Renderer
depends_on AbstractController::Layouts
-
+
module ClassMethods
def _implied_layout_name
controller_path
end
end
-
+
def render_to_body(options)
# render :text => ..., :layout => ...
# or
@@ -18,22 +18,20 @@ module ActionController
if !options.key?(:text) || options.key?(:layout)
options[:_layout] = options.key?(:layout) ? _layout_for_option(options[:layout]) : _default_layout
end
-
+
super
end
-
+
private
-
def _layout_for_option(name)
case name
when String then _layout_for_name(name)
when true then _default_layout(true)
when false, nil then nil
else
- raise ArgumentError,
- "String, true, or false, expected for `layout'; you passed #{name.inspect}"
+ raise ArgumentError,
+ "String, true, or false, expected for `layout'; you passed #{name.inspect}"
end
end
-
end
end