aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-09-08 19:41:57 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-09-08 19:41:57 -0700
commit3c658512a1fb561743bf626b9655c86765510f06 (patch)
tree90180c51358a6781b958a5a29ae4bc043af14add /actionpack/lib/action_controller
parent1b94d5dc6500a34803fda784d87a361b532b3fb4 (diff)
downloadrails-3c658512a1fb561743bf626b9655c86765510f06.tar.gz
rails-3c658512a1fb561743bf626b9655c86765510f06.tar.bz2
rails-3c658512a1fb561743bf626b9655c86765510f06.zip
Use defined? check since @view_paths may be uninitialized
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/base.rb6
1 files changed, 5 insertions, 1 deletions
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 @@ module ActionController #:nodoc:
# 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)