aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/hash
Commit message (Collapse)AuthorAgeFilesLines
...
* Use a decorator module for Files instantiated by Hash.from_xml. Add test ↵Jeremy Kemper2008-01-061-3/+18
| | | | | | coverage. Closes #10726 [Cheah Chu Yeow] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8579 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Simplify and speedup Hash#stringify_keys! References #10717 [Cheah Chu Yeow]Jeremy Kemper2008-01-061-4/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8576 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Moved the caching stores from ActionController::Caching::Fragments::* to ↵David Heinemeier Hansson2008-01-031-0/+2
| | | | | | ActiveSupport::Cache::*. If you're explicitly referring to a store, like ActionController::Caching::Fragments::MemoryStore, you need to update that reference with ActiveSupport::Cache::MemoryStore [DHH] Deprecated ActionController::Base.fragment_cache_store for ActionController::Base.cache_store [DHH] All fragment cache keys are now by default prefixed with the 'views/' namespace [DHH] Added ActiveRecord::Base.cache_key to make it easier to cache Active Records in combination with the new ActiveSupport::Cache::* libraries [DHH] Added ActiveSupport::Gzip.decompress/compress(source) as an easy wrapper for Zlib [Tobias Luetke] Included MemCache-Client to make the improved ActiveSupport::Cache::MemCacheStore work out of the box [Bob Cottrell, Eric Hodel] Added config.cache_store to environment options to control the default cache store (default is FileStore if tmp/cache is present, otherwise MemoryStore is used) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8546 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Correct Hash#assert_valid_keys docs. Closes #10621 [Cheah Chu Yeow, blackanger]Jeremy Kemper2008-01-021-3/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8521 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Hash#symbolize_keys skips keys that can't be symbolized. Closes #10500.Jeremy Kemper2007-12-201-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8454 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: move from the deprecated Base64 module to ↵Jeremy Kemper2007-12-181-2/+1
| | | | | | ActiveSupport::Base64. Closes #10554. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8433 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Move #to_query methods where they ought to belong. Closes #10395 [Chu Yeow]Jeremy Kemper2007-12-091-17/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8343 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactor of Hash#symbolize_keys! to use Hash#replace. Closes #10420 [ReinH]Rick Olson2007-12-081-7/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8333 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix HashWithIndifferentAccess#to_options! so it doesn't clear the options ↵Rick Olson2007-12-081-0/+1
| | | | | | hash. Closes #10419 [ReinH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8332 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix that empty collections should be treated as empty arrays regardless of ↵David Heinemeier Hansson2007-11-251-13/+13
| | | | | | whitespace for Hash#from_xml (closes #10255) [adamj] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8202 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add documentation for Hash#diff. Closes #9306 [tarmo]Marcel Molina2007-11-061-0/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8093 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Hash#to_xml handles symbol values. Closes #9954.Jeremy Kemper2007-10-231-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7997 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Hash#symbolize_keys behaves well with integer keys. Closes #9890.Jeremy Kemper2007-10-161-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7945 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Rebundle Builder 2.1.2 but prefer a newer RubyGem if available.Jeremy Kemper2007-10-101-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7828 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Documentation for assert_valid_keys. Closes #7264 [tarmo, rsanheim]Michael Koziarski2007-10-081-0/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7792 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* String#to_xs uses the fast_xs extension if available for Builder speedup.Jeremy Kemper2007-10-071-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Hash#to_xml doesn't double-unescape. Closes #8806.Jeremy Kemper2007-09-171-9/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7505 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Support for non heterogeneous arrays when serializing to xml. Unless ↵Tobias Lütke2007-07-091-10/+13
| | | | | | guessable from array name the type name will be included as attribute git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7173 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Hash#except which is the inverse of Hash#slice -- return the hash ↵David Heinemeier Hansson2007-07-091-0/+24
| | | | | | except the keys that are specified [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7172 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Demote Hash#to_xml to use XmlSimple#xml_in_string so it can't read files or ↵Jeremy Kemper2007-06-231-1/+22
| | | | | | stdin. Closes #8453. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7086 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove deprecated Hash#create_from_xml. Use Hash#from_xml.Jeremy Kemper2007-06-231-5/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7085 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added proper handling of arrays. Closes #8537 [hasmanyjosh]Rick Olson2007-06-211-0/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7074 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* revert [6924]Rick Olson2007-06-051-14/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6946 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added proper handling of arrays (closes #8537) [hasmanyjosh]David Heinemeier Hansson2007-06-011-0/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6924 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Pull file from xml value only if it's a Hash. Closes #8190.Jeremy Kemper2007-04-261-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6583 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* XML values can be nilDavid Heinemeier Hansson2007-04-261-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6582 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added parsing of file type in Hash.xml_in so you can easily do file uploads ↵David Heinemeier Hansson2007-04-251-12/+31
| | | | | | with base64 from an API [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6578 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use XSD-compatible type names for Hash#to_xml and make the converters ↵David Heinemeier Hansson2007-04-211-11/+30
| | | | | | extendable #8047 [Tim Pope] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6546 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added yielding of builder in Hash#to_xml [DHH]David Heinemeier Hansson2007-04-191-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6540 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that parameters from XML should also be presented in a hash with ↵David Heinemeier Hansson2007-04-162-2/+10
| | | | | | indifferent access [DHH] 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] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6532 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Hash#to_xml supports YAML attributes; ActiveRecord::Base#to_xml support ↵Jeremy Kemper2007-03-181-2/+4
| | | | | | serialized attributes. Closes #7502. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6444 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Array#to_query preserves its ordering. References #7756.Jeremy Kemper2007-03-111-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6378 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow array and hash query parameters. Array route parameters are ↵Jeremy Kemper2007-03-061-3/+3
| | | | | | converted/to/a/path as before. References #6765, #7462. Closes #7047. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6343 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Hash#to_query CGI-escapes its keys.Jeremy Kemper2007-02-111-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6148 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make to_query safe against nilsDavid Heinemeier Hansson2007-01-241-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6039 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Hash#to_query to turn a hash of values into a form-encoded query ↵David Heinemeier Hansson2007-01-241-0/+24
| | | | | | string [Nicholas Seckar] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6038 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Hash#slice(*keys) returns a new hash with only the given keys. #slice! ↵Jeremy Kemper2006-12-171-0/+28
| | | | | | replaces the hash with only the given keys. Works with HashWithIndifferentAccess also. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5726 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* HashWithIndifferentAccess#to_hash converts to a Hash with String keys and ↵Jeremy Kemper2006-12-162-3/+8
| | | | | | the same default value. Fix Hash#reverse_update to be an alias for reverse_merge./script/console More thoroughly test the reverse_* methods. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5725 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Hash#to_xml handles keys with the same name as Kernel methods. Closes #6613.Jeremy Kemper2006-11-141-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5521 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Hash#to_xml supports Bignum and BigDecimal. Closes #6313.Jeremy Kemper2006-09-291-8/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5209 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Hash.create_from_xml has been renamed to Hash.from_xml, alias will exist ↵David Heinemeier Hansson2006-09-201-2/+7
| | | | | | until Rails 2.0 [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5149 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix cases where empty xml nodes weren't being translated to nil in ↵Rick Olson2006-09-011-1/+1
| | | | | | Hash.create_from_xml [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4895 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Strip boolean XML content before checking for 'true' [Rick Olson]Rick Olson2006-07-211-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4616 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Get rid of constant redefinition warnings when running AP testsMarcel Molina2006-07-131-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4610 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Correctly convert <foo nil=true> to nil when using Hash.create_from_xml. [Rick]Rick Olson2006-07-131-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4607 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* HashWithIndifferentAccess shouldn't confuse false and nil. Closes #5601. Nor ↵Jeremy Kemper2006-07-051-7/+10
| | | | | | should it mistreat legitimate nil values. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4555 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed HashWithIndifferentAccess#default (closes #5586) [chris@seagul.co.uk]David Heinemeier Hansson2006-07-051-4/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4539 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* More compatible Hash.create_from_xml. Closes #5523.Jeremy Kemper2006-06-291-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4510 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Hash.create_from_xml(string) which will create a hash from a XML ↵David Heinemeier Hansson2006-06-161-0/+70
| | | | | | string and even typecast if possible [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4453 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added binary formattingDavid Heinemeier Hansson2006-06-041-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4432 5ecf4fe2-1ee6-0310-87b1-e25e094e27de