aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-03-19 19:38:38 +0000
committerRick Olson <technoweenie@gmail.com>2006-03-19 19:38:38 +0000
commita6cfb4e0e4209e06b4ba561b688ee2c3b942e3dd (patch)
tree2bf1656c898c35a021e779bf2bc833ae043eccae /actionpack/test
parent9a72cd22cf427754a30af409c4651da2017296a8 (diff)
downloadrails-a6cfb4e0e4209e06b4ba561b688ee2c3b942e3dd.tar.gz
rails-a6cfb4e0e4209e06b4ba561b688ee2c3b942e3dd.tar.bz2
rails-a6cfb4e0e4209e06b4ba561b688ee2c3b942e3dd.zip
Fix mixed case enumerable methods in the JavaScript Collection Proxy (closes #4314) [codyfauser@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3984 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/prototype_helper_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/test/template/prototype_helper_test.rb b/actionpack/test/template/prototype_helper_test.rb
index eb8de1ff40..65e8cf9b96 100644
--- a/actionpack/test/template/prototype_helper_test.rb
+++ b/actionpack/test/template/prototype_helper_test.rb
@@ -391,6 +391,18 @@ return array.reverse();
EOS
end
+ def test_collection_proxy_with_find_all
+ @generator.select('p').find_all 'a' do |value, index|
+ @generator << '(value.className == "welcome")'
+ end
+
+ assert_equal <<-EOS.strip, @generator.to_s
+var a = $$("p").findAll(function(value, index) {
+return (value.className == "welcome");
+});
+ EOS
+ end
+
def test_debug_rjs
ActionView::Base.debug_rjs = true
@generator['welcome'].replace_html 'Welcome'
@@ -404,3 +416,4 @@ return array.reverse();
assert_equal "Form.focus(\"my_field\");", @generator.to_s
end
end
+