Skip to content

Commit

Permalink
Initialize @optional in routing code to avoid warnings
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3163 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
seckar committed Nov 22, 2005
1 parent 3e51cd8 commit bd5ace8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*

* Initialize @optional in routing code to avoid warnings about uninitialized access to an instance variable. [Nicholas Seckar]

* Make ActionController's render honor the :locals option when rendering a :file. #1665. [Emanuel Borsboom, Marcel Molina Jr.]

* Allow assert_tag(:conditions) to match the empty string when a tag has no children. Closes #2959. [Jamis Buck]
Expand Down
1 change: 1 addition & 0 deletions actionpack/lib/action_controller/routing.rb
Expand Up @@ -100,6 +100,7 @@ def default=(default)

def initialize(key, options = {})
@key = key.to_sym
@optional = false
default, @condition = options[:default], options[:condition]
self.default = default if options.key?(:default)
end
Expand Down

0 comments on commit bd5ace8

Please sign in to comment.