assert_tag uses exact matches for string conditions, instead of partial matches. Use regex to do partial matches. #2799

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2952 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jamis Buck
2005-11-09 13:42:05 +00:00
parent bc7ec23f4e
commit b7ce9c5a87
2 changed files with 3 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
*SVN*
* assert_tag uses exact matches for string conditions, instead of partial matches. Use regex to do partial matches. #2799
* CGI::Session::ActiveRecordStore.data_column_name = 'foobar' to use a different session data column than the 'data' default. [nbpwie102@sneakemail.com]
* Do not raise an exception when default helper is missing; log a debug message instead. It's nice to delete empty helpers. [Jeremy Kemper]

View File

@@ -497,7 +497,7 @@ module HTML #:nodoc:
def match_condition(value, condition)
case condition
when String
value && value.index(condition)
value && value == condition
when Regexp
value && value.match(condition)
when Numeric