aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/ordered_options.rb
Commit message (Collapse)AuthorAgeFilesLines
* [Active Support] require_relative => requireAkira Matsuda2017-10-211-1/+1
| | | | This basically reverts 8da30ad6be34339124ba4cb4e36aea260dda12bc
* Make bang version work with `InheritableOptions`yuuji.yaginuma2017-09-231-1/+1
| | | | | | | | Currently, bang version does not work with `InheritableOptions`. `InheritableOptions` treats the argument Hash as the default value. However, `Hash#fetch` does not use the default value when key is not found, so can not get the default value. So in bang version, should use `Hash#[]` instead of `Hash#fetch`.
* Fix error message documentationManoj M J2017-09-201-2/+2
|
* [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
|
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-2/+2
|
* applies new string literal convention in activesupport/libXavier Noria2016-08-061-3/+3
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Fix missing requires for object/blankRafael Mendonça França2016-06-131-0/+2
|
* Improved `KeyError` messages on bang version, since commit ↵amitkumarsuroliya2015-10-111-1/+1
| | | | https://github.com/rails/rails/commit/e768c519fb6015e00961702a5165c6dab548a954 bang version produces `KeyError` [ci skip]
* Add to RDoc of OrderedOptions the bang infoMauro George2015-07-061-0/+8
| | | | [ci skip]
* Fix indentation warning on active_support ordered_optionsMehmet Emin İNAÇ2015-05-271-1/+1
|
* Merge pull request #20208 from gaurish/raise_on_missing_ordered_optionsRafael Mendonça França2015-05-261-1/+7
|\ | | | | | | Add bang version to OrderedOptions
| * Add bang version to OrderedOptionsGaurish Sharma2015-05-231-1/+6
|/ | | | | | By: Aditya Sanghi(@asanghi) Gaurish Sharma(gaurish)
* Fixed grammar error in ordered_options documention.Dustin Lam2013-08-171-1/+1
|
* added docs for InheritedOptions class [ci skip]Anton Kalyaev2013-05-111-0/+8
|
* update AS docs [ci skip]Francesco Rodriguez2012-09-171-2/+2
|
* fix AS::OrderedOptions documentation [ci skip]Francesco Rodriguez2012-09-171-16/+15
|
* Use respond_to_missing? for OrderedOptionsMarc-Andre Lafortune2012-05-051-1/+1
|
* ordered_options will work if inherited from Hash, remove OrderedHash usageVishnu Atrai2012-02-211-3/+1
|
* Replace regexp matching with a simple string manipulation.Semyon Perepelitsa2012-01-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using regexp looks like overkill here and is also 2x slower. user system total real string 0.020000 0.000000 0.020000 ( 0.016256) regexp 0.030000 0.000000 0.030000 ( 0.035360) require "benchmark" names = ("a".."z").map { |c| c + "a" * rand(5..10) + "=" * rand(0..1) }.map(&:to_sym) puts names n = 1000 Benchmark.bmbm do |x| x.report "string" do n.times do names.each do |name| string_name = name.to_s string_name.chomp!('=') string_name end end end x.report "regexp" do n.times do names.each do |name| name.to_s =~ /(.*)=$/ $1 end end end end
* OrderedOptions must implement respond_to? if it implements method_missing.Chris Eppstein2011-06-271-0/+4
|
* Fix incorrect example.Ben Orenstein2011-03-051-2/+2
|
* Remove redundant to_sym call.Ben Orenstein2011-02-281-1/+1
| | | | | | [#6483 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Try to use Hash's native #[] for speed.thedarkone2010-09-271-1/+7
|
* Make InheritableOptions's constructor more flexible.thedarkone2010-09-271-2/+6
|
* Compile ActionController::Base.config's methods to avoid method_missing ↵thedarkone2010-09-271-0/+4
| | | | overhead.
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-3/+3
| | | | 's/[ \t]*$//' -i {} \;)
* commit review: say clearly that AS::OrderedHash is about insertion order, be ↵Xavier Noria2010-08-061-4/+4
| | | | more neutral in wording, do not imply lack of ordering is a problem
* adding documentation for OrderedHash and OrderedOptionsNeeraj Singh2010-08-061-0/+16
|
* Move InheritableOptions into ActiveSupportCarlhuda2010-03-031-0/+6
|
* Explicit dependency on OrderedHashJeremy Kemper2009-03-281-1/+3
|
* Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ↵Joshua Peek2008-06-031-12/+14
| | | | ActiveSupport [#238 state:resolved]
* Create a seperate file for ActiveSupport::OrderedHash.Joshua Peek2008-05-141-44/+0
|
* Added OrderedHash#delete [#113 state:resolved]Sean Ouimet2008-05-051-0/+6
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Add OrderedHash#to_hash. Closes #11266 [josh]Michael Koziarski2008-03-031-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8974 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Hash is ordered in Ruby 1.9Jeremy Kemper2007-10-091-17/+22
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7817 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use Array#assoc in ActiveSupport::OrderedHash.Jeremy Kemper2006-08-251-8/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4817 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add OrderedHash#valuesSam Stephenson2006-06-021-1/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4411 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fix test warningsJeremy Kemper2006-05-311-22/+24
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4386 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Namespaced OrderedHash so the Rails implementation does not clash with any ↵Rick Olson2006-04-301-2/+3
| | | | | | others. (fixes #4911) [Julian Tarkhanov] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4318 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added calculations: Base.count, Base.average, Base.sum, Base.minimum, ↵David Heinemeier Hansson2006-02-251-11/+23
| | | | | | Base.maxmium, and the generic Base.calculate. All can be used with :group and :having. Calculations and statitics need no longer require custom SQL. #3958 [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3646 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Dont include unnecessary active support classes in docsDavid Heinemeier Hansson2005-10-161-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added method access to OrdredOptionsDavid Heinemeier Hansson2005-09-301-0/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2422 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added OrderedOptions array/hash for use with initializerDavid Heinemeier Hansson2005-09-301-0/+23
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2419 5ecf4fe2-1ee6-0310-87b1-e25e094e27de