Changeset 4616
- Timestamp:
- 07/21/06 05:52:30 (2 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) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activesupport/CHANGELOG
r4608 r4616 1 1 *SVN* 2 3 * Strip boolean XML content before checking for 'true' [Rick Olson] 2 4 3 5 * Customize default BigDecimal formatting. References #5672 [dave@pragprog.com] trunk/activesupport/lib/active_support/core_ext/hash/conversions.rb
r4610 r4616 96 96 case value["type"] 97 97 when "integer" then content.to_i 98 when "boolean" then content == "true"98 when "boolean" then content.strip == "true" 99 99 when "datetime" then ::Time.parse(content).utc 100 100 when "date" then ::Date.parse(content) trunk/activesupport/test/core_ext/hash_ext_test.rb
r4607 r4616 314 314 <author-name>David</author-name> 315 315 <id type="integer">1</id> 316 <approved type="boolean"> false</approved>316 <approved type="boolean"> true </approved> 317 317 <replies-count type="integer">0</replies-count> 318 318 <written-on type="date">2003-07-16</written-on> … … 328 328 :author_name => "David", 329 329 :id => 1, 330 :approved => false,330 :approved => true, 331 331 :replies_count => 0, 332 332 :written_on => Date.new(2003, 7, 16),