Initialize @optional in routing code to avoid warnings

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3163 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Nicholas Seckar
2005-11-22 22:24:25 +00:00
parent 3e51cd8b8e
commit bd5ace88b2
2 changed files with 3 additions and 0 deletions

View File

@@ -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]

View File

@@ -100,6 +100,7 @@ module ActionController
def initialize(key, options = {})
@key = key.to_sym
@optional = false
default, @condition = options[:default], options[:condition]
self.default = default if options.key?(:default)
end