Fixed that *rest parameter in map.connect couldn't accept an empty list #1037 [Dee.Zsombor@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1158 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
ecf82d127b
commit
7f558cbd05
@ -1,5 +1,7 @@
|
|||||||
*SVN*
|
*SVN*
|
||||||
|
|
||||||
|
* Fixed that *rest parameter in map.connect couldn't accept an empty list #1037 [Dee.Zsombor@gmail.com]
|
||||||
|
|
||||||
* Added :confirm option to link_to_remote just like link_to has #1082 [yrashk@fp.org.ua]
|
* Added :confirm option to link_to_remote just like link_to has #1082 [yrashk@fp.org.ua]
|
||||||
|
|
||||||
* Added minute_step as an option to select_minute (and the helpers that use it) to jump in larger increments than just 1 minute. At 15, it would return 0, 15, 30, 45 options #1085 [ordwaye@evergreen.edu]
|
* Added minute_step as an option to select_minute (and the helpers that use it) to jump in larger increments than just 1 minute. At 15, it would return 0, 15, 30, 45 options #1085 [ordwaye@evergreen.edu]
|
||||||
|
@ -119,7 +119,11 @@ def recognize(components, options={})
|
|||||||
options[:controller] = controller_class.controller_path
|
options[:controller] = controller_class.controller_path
|
||||||
return nil, requirements_for(:controller) unless passes_requirements?(:controller, options[:controller])
|
return nil, requirements_for(:controller) unless passes_requirements?(:controller, options[:controller])
|
||||||
elsif /^\*/ =~ item.to_s
|
elsif /^\*/ =~ item.to_s
|
||||||
value = components.empty? ? @defaults[item].clone : components.clone
|
if components.empty?
|
||||||
|
value = @defaults.has_key?(item) ? @defaults[item].clone : []
|
||||||
|
else
|
||||||
|
value = components.clone
|
||||||
|
end
|
||||||
value.collect! {|c| CGI.unescape c}
|
value.collect! {|c| CGI.unescape c}
|
||||||
components = []
|
components = []
|
||||||
def value.to_s() self.join('/') end
|
def value.to_s() self.join('/') end
|
||||||
|
@ -343,7 +343,10 @@ def test_path_collection_with_array
|
|||||||
{})
|
{})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_path_empty_list
|
||||||
|
route '*a', :controller => 'content'
|
||||||
|
verify_recognize '', :controller => 'content', :a => []
|
||||||
|
end
|
||||||
|
|
||||||
def test_special_characters
|
def test_special_characters
|
||||||
route ':id', :controller => 'content', :action => 'fish'
|
route ':id', :controller => 'content', :action => 'fish'
|
||||||
|
Loading…
Reference in New Issue
Block a user