aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb
Commit message (Collapse)AuthorAgeFilesLines
* [Active Support] require_relative => requireAkira Matsuda2017-10-211-1/+1
| | | | This basically reverts 8da30ad6be34339124ba4cb4e36aea260dda12bc
* [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-091-0/+1
|
* [Active Support] require => require_relativeAkira Matsuda2017-07-011-1/+1
|
* applies remaining conventions across the projectXavier Noria2016-08-061-1/+0
|
* applies new string literal convention in activesupport/libXavier Noria2016-08-061-1/+1
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* `HashWithIndifferentAccess.new` respects the default value or proc on ↵Gordon Chan2014-07-311-1/+1
| | | | | | | | | | | | | | | objects that respond to `#to_hash`. Builds on the work of #12550 where `.new` will convert the object (that respond to `#to_hash`) to a hash and add that hash's keys and values to itself. This change will also make `.new` respect the default value or proc of objects that respond to `#to_hash`. In other words, this `.new` behaves exactly like `.new_from_hash_copying_default`. `.new_from_hash_copying_default` now simply invokes `.new` and any references to `.new_from_hash_copying_default` are replaced with `.new`. Added tests confirm behavior.
* Correct result, previously showing wrong resultAkshay Vishnoi2014-06-041-1/+1
|
* documentation updated for Hashes [ci skip]KD2013-11-111-0/+1
|
* Replace comments' non-breaking spaces with spacesclaudiob2012-12-041-1/+1
| | | | | | | | | | Sometimes, on Mac OS X, programmers accidentally press Option+Space rather than just Space and don’t see the difference. The problem is that Option+Space writes a non-breaking space (0XA0) rather than a normal space (0x20). This commit removes all the non-breaking spaces inadvertently introduced in the comments of the code.
* fix AS/core_ext examples [ci skip]Francesco Rodriguez2012-09-121-1/+1
|
* update AS/core_ext docs [ci skip]Francesco Rodriguez2012-09-121-5/+3
|
* fixes in api docsVijay Dev2012-01-131-1/+1
|
* docs formatting changesVijay Dev2011-09-011-1/+1
|
* with -> willUģis Ozols2011-06-121-1/+1
|
* indifferent access should recurse Hash subclassesDavid Lee2011-05-081-0/+12
| | | | | | | | | | | | | | This commit makes Hash subclasses convert to HWIA by default for nested objects of subclasses of Hash, but allows certain subclasses to prevent nested conversion by introducing Hash#nested_under_indifferent_access that subclasses can overwrite. ActiveSupport::OrderedHash is one such subclass that overwrites +nested_under_indifferent_access+, since implicitly converting it to HWIA would remove the ordering of keys and values in Ruby 1.8. This change is necessary because commit ce9456e broke nested indifferent access conversion for all subclasses of Hash.
* avoids a ton o warnings ↵Xavier Noria2010-08-191-3/+1
| | | | activesupport/lib/active_support/dependencies.rb:239: warning: loading in progress, circular require considered harmful ... activesupport/lib/active_support/core_ext/hash/indifferent_access.rb while running the suite in Ruby 1.9.2
* documents Hash#with_indifferent_accessXavier Noria2009-09-121-0/+5
|
* Namespace HashWithIndifferentAccessJeremy Kemper2009-03-211-1/+1
|
* Convert hash extension modules to class reopensJeremy Kemper2009-03-211-140/+6
|
* Ensure HWIA#reverse_merge! retrurns HWIA [#421 state:resolved]Bradford Folkens2009-03-121-0/+6
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Merge docrails:Pratik Naik2008-05-091-22/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit e6afd8b2736364322b673bbdcca3e9b38b6d3da0 Author: Xavier Noria <fxn@hashref.com> Date: Thu May 8 23:49:36 2008 +0200 Overall documentation improvement and markup corrections. Zillion changes. commit 2fead68b3192332eee27945ed95a94a64ca73f70 Author: Austin Putman <austin@emmanuel.local> Date: Wed May 7 19:35:46 2008 -0700 Documented class methods on ActionController::Routing. These are dangerous, and mostly used for testing. commit f5b84182dbc39bea79c8ee319c688d00fa99f9d1 Author: Teflon Ted <github@rudiment.net> Date: Wed May 7 16:08:49 2008 -0400 Added explanation about errant inflections not being patched in the future in order to avoid breaking legacy applications. commit 370f4f51722cec49ace17093d29e9ce9e8f15cfb Author: Sunny Ripert <negatif@gmail.com> Date: Wed May 7 14:00:59 2008 +0200 Applied list conventions in AR::Base commit 5bd18429f09d44e75191bec42a6db04bd33f3030 Author: Sunny Ripert <negatif@gmail.com> Date: Wed May 7 13:53:35 2008 +0200 Renamed Options list to Attributes list whenever they weren't option hashes in AR::Base commit d912bd5672316454457ae83f6e9dda5197beeb6f Author: Yaroslav Markin <yaroslav@markin.net> Date: Wed May 7 13:50:28 2008 +0400 Add a filter_parameter_logging usage hint to generated ApplicationController. This may help to remind the developer to filter sensitive information from application logs. Closes #11578 commit b243de0db3c2605121e055079854af5090d06374 Author: Jack Danger Canty <git@6brand.com> Date: Tue May 6 23:39:47 2008 -0700 doc: disambiguating an example ActiveRecord class commit f81d771f0657ae8375b84a77a059812cce5d6fd9 Author: Jack Danger Canty <git@6brand.com> Date: Tue May 6 23:35:05 2008 -0700 doc: ActiveRecord::Reflection::AssociationReflection#through_reflection Added documentation demonstrating the use of #through_reflection for finding intervening reflection objects for HasManyThrough and HasOneThrough. commit ae6b46f00b5b8b2939c6b37ce3329c83de7e71db Author: Cheah Chu Yeow <chuyeow@gmail.com> Date: Wed May 7 13:47:41 2008 +0800 Document AttributeAssignmentError and MultiparameterAssignmentErrors. commit 8f463550b597db2156b67733f31aed13487fbc3a Author: John Barnette <jbarnette@gmail.com> Date: Tue May 6 22:46:44 2008 -0700 Killing/fixing a bunch of outdated language in the AR README. commit aca44bcd92ef783abdf484b58abdde6786db0f89 Author: Cheah Chu Yeow <chuyeow@gmail.com> Date: Wed May 7 13:34:52 2008 +0800 Make a note about ActiveResource::Timeouterror being raised when ARes calls timeout. commit 284a930a93fbee16e25d06392779dbf2f03e9e12 Author: Jonathan Dance <jd@wuputah.com> Date: Tue May 6 14:58:26 2008 -0400 improvements to the page caching docs commit 9482da621390c874da7c921c8bd6230caae7035a Author: Sunny Ripert <negatif@gmail.com> Date: Mon May 5 18:13:40 2008 +0200 validates_numericality_of() "integer" option really is "only_integer" commit e9afd6790a8f530528f6597a7f59bb283be754f6 Author: Sunny Ripert <negatif@gmail.com> Date: Mon May 5 12:11:59 2008 +0200 Harmonized hash notation in AR::Base commit 67ebf14a91ffd970b582be4ff2991d691a9cf3e1 Author: Sunny Ripert <negatif@gmail.com> Date: Mon May 5 12:06:19 2008 +0200 Turned options into rdoc-lists in AR::Base commit 0ec7c0a41d889d4e5382b9dff72f1aaba89bf297 Author: Marshall Huss <mwhuss@Macbook.local> Date: Sun May 4 23:21:33 2008 -0400 Added information of how to set element_name in the case the user has a name confliction with an existing model Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Improve documentation.Pratik Naik2008-03-261-0/+36
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9093 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
* Fixed that parameters from XML should also be presented in a hash with ↵David Heinemeier Hansson2007-04-161-1/+9
| | | | | | 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
* HashWithIndifferentAccess#to_hash converts to a Hash with String keys and ↵Jeremy Kemper2006-12-161-1/+6
| | | | | | 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
* 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
* Don't destroy a HashWithIndifferentAccess if symbolize_keys! or ↵Marcel Molina2006-05-141-0/+3
| | | | | | stringify_keys! is called on it. Closes #5076. [Marcel Molina Jr., guy.naor@famundo.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4339 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use --simple-prompt instead of --prompt-mode simple for console ↵David Heinemeier Hansson2006-04-011-1/+1
| | | | | | compatibility with Windows/Ruby 1.8.2 #4532 [starr@starrnhorne.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4118 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed the hash.delete :sym (closes #2176) [Stefan Kaes]David Heinemeier Hansson2006-03-201-2/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4005 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Performance speedup for ActionController (closes #4174) [Stefan Kaes] ↵David Heinemeier Hansson2006-03-201-1/+1
| | | | | | Includes caching of filter chains -- be on the lookout for problems with that! git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3989 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Rolled back #2176 because it destroyed performance [DHH]David Heinemeier Hansson2006-03-201-24/+36
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3988 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fix indifferent hash. The lambdas were acting funny in a running rails app. ↵Rick Olson2006-03-201-5/+15
| | | | | | closes #2176 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3987 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed HashWithIndifferentAccess#delete to work with both symbols and strings ↵David Heinemeier Hansson2006-03-181-36/+14
| | | | | | (closes #2176) [Caio Chassot] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3912 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Major components cleanup and speedup. Closes #3527.Jeremy Kemper2006-02-091-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3563 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix merge and dup for hashes with indifferent access (closes #3404) ↵David Heinemeier Hansson2006-01-231-0/+8
| | | | | | [kenneth.miller@bitfield.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3468 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make HashWithIndifferentAccess#update behave like Hash#update by returning ↵Marcel Molina2006-01-081-2/+5
| | | | | | the hash. Closes #3419, #3425 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3388 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed documentation for release (AS)David Heinemeier Hansson2005-07-061-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1735 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1300@iwill: jeremy | 2005-06-13 18:31:29 -0700Jeremy Kemper2005-06-131-10/+4
| | | | | | | | | | | Ticket 1436 - Faster indifferent hash r1301@iwill: jeremy | 2005-06-13 18:45:28 -0700 Apply, tweak, test. r1305@iwill: jeremy | 2005-06-13 18:50:24 -0700 Updated changelog. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1413 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that HashWithIndifferentAccess stringified all keys including symbols, ↵David Heinemeier Hansson2005-05-191-1/+1
| | | | | | ints, objects, and arrays #1162 [Nicholas Seckar] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1329 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed Hash#indifferent_access to also deal with include? and fetch and ↵David Heinemeier Hansson2005-03-071-1/+29
| | | | | | nested hashes #726 [Nicholas Seckar] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@872 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed an exception when using Ajax based requests from Safari because Safari ↵David Heinemeier Hansson2005-03-031-4/+4
| | | | | | appends a \000 to the post body. Symbols can't have \000 in them so indifferent access would throw an exception in the constructor. Indifferent hashes now use strings internally instead. #746 [Tobias Luetke] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@827 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Moved Active Support into its own gemDavid Heinemeier Hansson2005-02-151-0/+38
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@624 5ecf4fe2-1ee6-0310-87b1-e25e094e27de