Skip to content

Commit

Permalink
Use defined? check since @view_paths may be uninitialized
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Sep 9, 2008
1 parent 1b94d5d commit 3c65851
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion actionpack/lib/action_controller/base.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -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 # render("test/template") will be looked up in the view load paths array and the closest match will be
# returned. # returned.
def view_paths def view_paths
@view_paths || superclass.view_paths if defined? @view_paths
@view_paths
else
superclass.view_paths
end
end end


def view_paths=(value) def view_paths=(value)
Expand Down

0 comments on commit 3c65851

Please sign in to comment.