aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/array/conversions.rb
Commit message (Collapse)AuthorAgeFilesLines
* [Active Support] require_relative => requireAkira Matsuda2017-10-211-6/+6
| | | | 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-6/+6
|
* Revert "Merge pull request #25811 from oss92/to_sentence_fallback_string"Rafael Mendonça França2016-11-141-8/+2
| | | | | | | | This reverts commit bad3a120f1690f393d8f6204b3ceee60f0ce707b, reversing changes made to 2384317465ccb1dfca456a2b7798714b99f32711. Reason: Adding a new option in the API for something that can be done with a `#presence` check could do.
* modernizes hash syntax in activesupportXavier Noria2016-08-061-3/+3
|
* applies new string literal convention in activesupport/libXavier Noria2016-08-061-14/+14
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Added :fallback_string option to Array#to_sentenceoss922016-07-131-2/+8
|
* Added Examples in docs for internal behavior of Array#to_formatted_s [ci skip]Ronak Jangir2015-09-191-1/+3
|
* Correct ArgumentError message in ActiveSupport conversions docs [ci skip]amitkumarsuroliya2015-09-181-1/+1
| | | This was happened after this commit https://github.com/rails/rails/commit/2ebf47aea21ff8ac10681e53e78dd7a0e5c31c6e
* Make sure Array#to_sentence always returns a StringDavid Cornu2015-03-231-1/+1
|
* Pass symbol as an argument instead of a blockErik Michaels-Ober2014-11-291-1/+1
|
* Revert "remove unnecssary require of `to_param`, as `to_query` is already ↵Rafael Mendonça França2014-06-111-0/+1
| | | | | | | | | | | | | | | | | | | | | require `to_param`" Revert "No need to require to_param, it is already required in to_query.rb" This reverts commits ccdd97662e1fb00c23c90d59f65c091904959561 and d697ee14264a90a39cdbe87857656d8b314ac9b7. Reason by @jeremy: These requires are not for implementation dependency. They ensure that requiring array conversions provides to_query, to_param, and other array conversion behaviors. The fact that to_query is implemented in terms of to_param is just a coincidence. If to_query removed its to_param require, then someone requiring array conversions would no longer have to_param available. This change removes these intentional dependencies on to_param in favor of implementation side effects—an undesirable move that's susceptible to regression.
* remove unnecssary require of `to_param`, as `to_query` is already require ↵Kuldeep Aggarwal2014-06-121-1/+0
| | | | `to_param`
* Array#to_formatted_s does not call each element's to_s anymoreAkira Matsuda2013-07-111-17/+2
| | | | Array#to_s calls each element's inspect since ruby 1.9
* fix broken format in Array#to_sentence [ci skip]Francesco Rodriguez2013-04-041-3/+5
|
* prefer american spelling of 'behavior'Gosha Arinich2013-01-071-1/+1
|
* Replace comments' non-breaking spaces with spacesclaudiob2012-12-041-3/+3
| | | | | | | | | | 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.
* Use `tag!` instead of `method_missing` in `to_xml` conversions.Nikita Afanasenko2012-11-041-3/+3
| | | | Since version `3.0.x` `Builder` caches method passed to `method_missing` each time. This commit replaces `method_missing` call with `tag!` call to prevent method redefinition on each `to_xml` call with the same builder.
* let (array|hash)/conversions.rb load the extensions in ↵Xavier Noria2012-10-091-0/+2
| | | | object/to_(param|query).rb
* update AS/core_ext docs [ci skip]Francesco Rodriguez2012-09-121-3/+3
|
* Ensure Array#to_sentence does not modify given hashCarlos Antonio da Silva2012-06-261-8/+3
| | | | | Also simplify I18n logic for Array#to_sentence, doing only one lookup for all keys and using merge!, instead of one lookup for each option key.
* some copy edits [ci skip]Vijay Dev2012-05-301-4/+4
|
* Updates Array conversions method documentations and clean upsAlvaro Pereyra2012-05-281-4/+0
|
* fix empty lines [ci skip]Francesco Rodriguez2012-05-281-1/+0
|
* Merge branch 'master' of github.com:lifo/docrailsAlvaro Pereyra2012-05-281-4/+52
|\
| * add :locale option to Array#to_sentence documentation [ci skip]Francesco Rodriguez2012-05-281-0/+27
| |
| * add examples to Array#to_sentence [ci skip]Francesco Rodriguez2012-05-281-4/+24
| |
* | Updates documentation with cleaner examples and texts [ci skip]Alvaro Pereyra2012-05-281-1/+14
| |
* | Remove blank trailing commentsHenrik Hodne2012-05-201-1/+0
|/ | | | | | | For future reference, this is the regex I used: ^\s*#\s*\n(?!\s*#). Replace with the first match, and voilà! Note that the regex matches a little bit too much, so you probably want to `git add -i .` and go through every single diff to check if it actually should be changed.
* AS core_ext refactoring pt.2Alexey Gaziev2012-04-291-44/+50
|
* AS core_ext refactoringAlexey Gaziev2012-04-291-1/+1
|
* Fixed misleading docs for String#to_formatted_s(:db)Martin Svalin2011-10-201-3/+3
|
* use new AR calls in examplesVijay Dev2011-05-071-2/+2
|
* to_sentence should return a duplicateMatthew Mongeau2010-08-171-1/+1
|
* polishing commentsNeeraj Singh2010-07-261-5/+5
|
* 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>
* 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>
* 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
|
* Fix the i18n dependency problemDavid Heinemeier Hansson2009-12-271-0/+1
|
* Consolidate Object#to_param and #to_query core extensionsJeremy Kemper2009-11-021-16/+0
|
* 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
|