aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/array
Commit message (Collapse)AuthorAgeFilesLines
* to_sentence should return a duplicateMatthew Mongeau2010-08-171-1/+1
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-142-5/+5
| | | | 's/[ \t]*$//' -i {} \;)
* explains Array.wrap directly, rather by comparison with Kernel#Array which ↵Xavier Noria2010-08-011-1/+22
| | | | is too obscure, leaves the comparison to document the differences, and adds a comparison with the related idiom that uses the splat operator
* Merge remote branch 'rails/master'Xavier Noria2010-07-302-5/+10
|\
| * edit pass to apply API guideline wrt the use of "# =>" in example codeXavier Noria2010-07-301-1/+1
| |
| * adds test coverage for edge-cases of Array.wrap, and better documentation ↵Xavier Noria2010-07-281-4/+9
| | | | | | | | for how it differs from Kernel#Array
* | polishing commentsNeeraj Singh2010-07-261-5/+5
|/
* Documentation for Array#sampleThiago Pradi2010-06-281-0/+7
|
* Fix a bunch of minor spelling mistakesEvgeniy Dolzhenko2010-06-111-1/+1
|
* removes Array#random_element and backports Array#sample from Ruby 1.9, ↵Xavier Noria2010-06-051-4/+18
| | | | thanks to Marc-Andre Lafortune
* Unforce builder from ASSantiago Pastorino2010-06-011-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Unforce i18n from ASSantiago Pastorino2010-05-311-3/+9
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Renames Array#rand -> Array#random_elementRizwan Reza2010-05-171-11/+1
| | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* Change on Array extension from rand => random_element [#4555 state:committed]Santiago Pastorino2010-05-161-1/+11
| | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* Move several configuration values from Hash to ActiveSupport::XmlMini, which ↵José Valim2010-04-291-15/+18
| | | | | | both Hash and Array depends on. Also, refactored ActiveModel serializers to just use ActiveSupport::XmlMini.to_tag. As consequence, if a serialized attribute is an array or a hash, it's not encoded as yaml, but as a hash or array.
* array.to_xml should be able to handle all types of data elements [#4490 ↵Neeraj Singh2010-04-291-18/+13
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Made arrays of ActiveRecords, and any classes, with namespaces convert to ↵mfoster2010-04-101-1/+1
| | | | | | valid xml. [#3824 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Limit Array#extract_options! to directl instances of Hash and HWIA. Add ↵wycats2010-03-271-1/+16
| | | | extractable_options? to Hash so that subclasses of Hash can opt-into extractable behavior. This fixes an issue where respond_with wasn't working with subclasses of Hash that were provided by other libraries (such as CouchDB or Mashie) [#4145 state:resolved]
* Make many parts of Rails lazy. In order to facilitate this,wycats2010-03-071-1/+0
| | | | | | | | | | | | add lazy_load_hooks.rb, which allows us to declare code that should be run at some later time. For instance, this allows us to defer requiring ActiveRecord::Base at boot time purely to apply configuration. Instead, we register a hook that should apply configuration once ActiveRecord::Base is loaded. With these changes, brings down total boot time of a new app to 300ms in production and 400ms in dev. TODO: rename base_hook
* Remove deprecated behavior since 2.3.José Valim and Mikel Lindsaar2010-01-241-13/+0
|
* Add uniq_by and uniq_by! to Array.José Valim and Mikel Lindsaar2010-01-241-0/+17
|
* Merge docrailsPratik Naik2010-01-172-1/+10
|
* Fix the i18n dependency problemDavid Heinemeier Hansson2009-12-271-0/+1
|
* Ruby 1.9.2: work around Array allowing method_missing for to_aryJeremy Kemper2009-11-131-4/+3
|
* Consolidate Object#to_param and #to_query core extensionsJeremy Kemper2009-11-021-16/+0
|
* Array.wrap(struct) needs to return the wrapped structYehuda Katz2009-10-281-12/+7
|
* This is all that's needed in 1.8.7+Yehuda Katz2009-10-281-10/+11
|
* Restore split between require-time and runtime load path mungery. Simplifies ↵Jeremy Kemper2009-09-241-1/+1
| | | | vendor requires.
* Rollback AS bundler work and improve activation of vendored dependenciesJoshua Peek2009-09-131-1/+1
|
* Fix that Hash#to_xml and Array#to_xml shouldn't modify their options hashes ↵David Burger2009-08-091-0/+1
| | | | | | [#672 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Merge docrailsPratik Naik2009-07-251-1/+1
|
* Fix dependencies revealed by testing in isolationJeremy Kemper2009-04-221-1/+5
|
* Convert array extension modules to class reopensJeremy Kemper2009-03-215-346/+309
|
* * Introduce ActiveSupport.core_ext Integer, %w(conversions time etc)Jeremy Kemper2009-03-212-24/+18
| | | | | | * Convert some extension modules to simply reopening the class * Remove deprecated Float time extensions * Fold Base64 extension into ActiveSupport::Base64 since stdlib Base64 is gone
* Force all internal calls to Array#to_sentence to use English [#2010 ↵David Heinemeier Hansson2009-02-271-3/+2
| | | | state:resolved]
* Deprecated warnings for :skip_last_command and :connector of to_sentence ↵Guillermo Álvarez2009-02-221-5/+19
| | | | | | [#1847 state:committed] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* Array#wrap should use #to_ary so association collections and named scopes ↵Will Bryant2009-02-101-2/+7
| | | | | | | | are not re-wrapped [#1935 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Introduce Array.wrap(foo) to wrap the argument in an array unless it's ↵Jeremy Kemper2009-02-061-0/+19
| | | | already an array. Wraps nil as an empty array. Use instead of Array(foo) and foo.to_a since they treat String as Enumerable.
* Change Array#to_sentence I18n options to pass comma and space character from ↵Akira Matsuda2008-12-081-9/+10
| | | | | | | | outside. [#1397 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Lazy-require builder libJeremy Kemper2008-11-231-2/+1
|
* Reduced the number of literal aliases to the range that has actually seen ↵David Heinemeier Hansson2008-11-211-23/+3
| | | | personal use. With the massive savings in overhead, I was able to fit Array#forty_two
* Fixed the option merging in Array#to_xml [#1126 state:resolved]David Heinemeier Hansson2008-10-311-1/+1
|
* Made i18n simple backend able to store false values (and not confuse them ↵Tarmo Tänav2008-10-091-1/+2
| | | | | | | | | with nil or lack of value) Implemented support.array.skip_last_comma i18n key for Array#to_sentence, this also tests the ability to store false. Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Merge docrailsPratik Naik2008-10-051-9/+9
|
* Merge docrailsPratik Naik2008-09-131-6/+6
|
* Performance: grouping helpers should use yield instead of block as argument. ↵miloops2008-07-301-5/+5
| | | | [#723 state:resolved]
* Merge docrails changesPratik Naik2008-07-281-9/+11
|
* merge forward to current rails/masterSven Fuchs2008-07-162-4/+48
|\
| * Add in_groups to ActiveSupport::CoreExtensions::Array::Grouping. [#579 ↵Adrian Mugnolo2008-07-151-2/+45
| | | | | | | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
| * Performance: minor Array#to_param and #to_query speedupsJeremy Kemper2008-06-241-2/+3
| |