diff options
Diffstat (limited to 'actionpack/lib/action_controller/base.rb')
-rw-r--r-- | actionpack/lib/action_controller/base.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 670a049497..457b9e85bc 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) @@ -449,7 +453,7 @@ module ActionController #:nodoc: # ArticleController.prepend_view_path(["views/default", "views/custom"]) # def prepend_view_path(path) - @view_paths = superclass.view_paths.dup if @view_paths.nil? + @view_paths = superclass.view_paths.dup if !defined?(@view_paths) || @view_paths.nil? @view_paths.unshift(*path) end |