diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-09-04 20:54:10 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-09-04 20:54:10 +0000 |
commit | 1d4d037b0d74fbc3c1cad1c192a6ea7278aff081 (patch) | |
tree | 7e2f64c751ddb5d0b2d3a11f2eb7c9cb12af3631 /actionpack/test | |
parent | bf8b101dd65eb261644c67fdc0e40bf54b9f2564 (diff) | |
download | rails-1d4d037b0d74fbc3c1cad1c192a6ea7278aff081.tar.gz rails-1d4d037b0d74fbc3c1cad1c192a6ea7278aff081.tar.bz2 rails-1d4d037b0d74fbc3c1cad1c192a6ea7278aff081.zip |
Added access to nested attributes in RJS (closes #4548) [richcollins@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5004 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/prototype_helper_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/template/prototype_helper_test.rb b/actionpack/test/template/prototype_helper_test.rb index 719a2f83ab..3954e38dcd 100644 --- a/actionpack/test/template/prototype_helper_test.rb +++ b/actionpack/test/template/prototype_helper_test.rb @@ -262,6 +262,16 @@ Element.update("baz", "<p>This is a test</p>"); @generator['hello'].hide assert_equal %($("hello").hide();), @generator.to_s end + + def test_element_proxy_variable_access + @generator['hello']['style'] + assert_equal %($("hello").style;), @generator.to_s + end + + def test_element_proxy_variable_access_with_assignment + @generator['hello']['style']['color'] = 'red' + assert_equal %($("hello").style.color = "red";), @generator.to_s + end def test_element_proxy_assignment @generator['hello'].width = 400 |