Changeset 6540
- Timestamp:
- 04/19/07 22:32:39 (3 years ago)
- Files:
-
- trunk/activesupport/CHANGELOG (modified) (1 diff)
- trunk/activesupport/lib/active_support/core_ext/hash/conversions.rb (modified) (1 diff)
- trunk/activesupport/test/core_ext/hash_ext_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activesupport/CHANGELOG
r6532 r6540 1 1 *SVN* 2 3 * Added yielding of builder in Hash#to_xml [DHH] 2 4 3 5 * Hash#with_indifferent_access now also converts hashes kept in arrays to indifferent access (makes it easier to treat HTML and XML parameters the same) [DHH] trunk/activesupport/lib/active_support/core_ext/hash/conversions.rb
r6532 r6540 100 100 end 101 101 end 102 103 yield options[:builder] if block_given? 102 104 end 103 105 trunk/activesupport/test/core_ext/hash_ext_test.rb
r6532 r6540 341 341 assert xml.include?(%(<name>David</name>)) 342 342 assert xml.include?(%(<age nil="true"></age>)) 343 end 344 345 def test_one_level_with_yielding 346 xml = { :name => "David", :street => "Paulina" }.to_xml(@xml_options) do |xml| 347 xml.creator("Rails") 348 end 349 350 assert_equal "<person>", xml.first(8) 351 assert xml.include?(%(<street>Paulina</street>)) 352 assert xml.include?(%(<name>David</name>)) 353 assert xml.include?(%(<creator>Rails</creator>)) 343 354 end 344 355