Permalink
Browse files

Initialize @_routes if not defined yet, avoiding more warnings.

  • Loading branch information...
1 parent bb71f18 commit 023c2020b3f94dadb86ead782c07006732d9ab56 @miloops miloops committed Sep 24, 2010
Showing with 1 addition and 0 deletions.
  1. +1 −0 actionpack/lib/action_controller/metal/url_for.rb
View
1 actionpack/lib/action_controller/metal/url_for.rb
@@ -6,6 +6,7 @@ module UrlFor
def url_options
options = {}
+ @_routes ||= nil
if _routes.equal?(env["action_dispatch.routes"])
options[:script_name] = request.script_name.dup
end

0 comments on commit 023c202

Please sign in to comment.