From 3c658512a1fb561743bf626b9655c86765510f06 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 8 Sep 2008 19:41:57 -0700 Subject: [PATCH] Use defined? check since @view_paths may be uninitialized --- actionpack/lib/action_controller/base.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 670a049497..eac6f73b24 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -434,7 +434,11 @@ def hide_action(*names) # render("test/template") will be looked up in the view load paths array and the closest match will be # returned. def view_paths - @view_paths || superclass.view_paths + if defined? @view_paths + @view_paths + else + superclass.view_paths + end end def view_paths=(value) -- GitLab