Permalink
Browse files

Initialize @optional in routing code to avoid warnings

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 bd5ace88b2cc8a56c33a8b44ca98de8cc15e0790
Showing with 3 additions and 0 deletions.
  1. +2 −0 actionpack/CHANGELOG
  2. +1 −0 actionpack/lib/action_controller/routing.rb
View
@@ -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]
@@ -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

0 comments on commit bd5ace8

Please sign in to comment.