aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/configurable.rb
Commit message (Collapse)AuthorAgeFilesLines
* Change wording of some instances of 'opt out' [ci skip]Sharang Dashputre2019-03-121-3/+3
|
* Consistently use kwargs for `instance_{reader,writer,accessor}` optionsRyuta Kamizono2018-10-201-7/+4
| | | | | | | | Since #29294, `mattr_acessor` uses kwargs for `instance_reader`, `instance_writer`, and `instance_accessor` options. `thread_mattr_accessor` and `config_accessor` also take the same options, so let's maintain these options handles the same.
* Bring config_accessor's API document back to its lifeAkira Matsuda2018-10-031-1/+1
| | | | the document has been disappeared since the method became private at c2bfe6cbc8cab9caeab418472a1e12a3ed3e75e2
* Remove unused `require "active_support/core_ext/regexp"`Ryuta Kamizono2018-07-291-1/+0
| | | | | | | | Ruby 2.4 has native `Regexp#match?`. https://ruby-doc.org/core-2.4.0/Regexp.html#method-i-match-3F Related #32034.
* [Active Support] require_relative => requireAkira Matsuda2017-10-211-4/+4
| | | | 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-4/+4
|
* applies new string literal convention in activesupport/libXavier Noria2016-08-061-5/+5
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* systematic revision of =~ usage in ASXavier Noria2016-07-221-2/+2
| | | | | Where appropriate prefer the more concise Regexp#match?, String#include?, String#start_with?, and String#end_with?
* Privatize config_accessor as with attr_accessorAkira Matsuda2015-02-061-0/+1
|
* Make sure multiline string is not accepted by the regexpRafael Mendonça França2013-12-191-1/+1
|
* Fixed configurable.rb regular expression name checkHincu Petru2013-12-191-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.
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-09-211-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: actionmailer/lib/action_mailer/base.rb activesupport/lib/active_support/configurable.rb activesupport/lib/active_support/core_ext/module/deprecation.rb guides/source/action_controller_overview.md guides/source/active_support_core_extensions.md guides/source/ajax_on_rails.textile guides/source/association_basics.textile guides/source/upgrading_ruby_on_rails.md While resolving conflicts, I have chosen to ignore changes done in docrails at some places - these will be most likely 1.9 hash syntax changes.
| * update AS docs [ci skip]Francesco Rodriguez2012-09-171-7/+7
| |
* | set up config_accessor with a default value by blockLarry Lv2012-09-171-6/+18
|/ | | | | | | | | | | | | | | | | | * ActiveSupport::Configurable should allow config_accessor to take default value by block, just like cattr_accessor. class User include ActiveSupport::Configurable config_accessor :hair_colors do [:brown, :black, :blonde, :red] end end User.hair_colors # => [:brown, :black, :blonde, :red] * remove trailing whitespaces in configurable.rb and its test file. * Update ActiveSupport CHANGELOG.
* correct line numbers for reader and writer methodsbenolee2012-06-241-6/+6
|
* add instance_accessor option to ActiveSupport::Configurable#config_accessorFrancesco Rodriguez2012-06-051-5/+52
| | | | | | | | | | Changes: * Add `instance_accessor` option to opt out of the instance writer and instance reader methods. * Raises a NameError if the name of the attribute is not valid. * Update documentation and tests. * Add CHANGELOG entry in activesupport.
* remove unused requiresSergey Nartimov2012-01-181-2/+0
|
* Fix configurable cristalization and tests.José Valim2011-06-291-2/+2
|
* Move variables to underscore format, update protected instance variables list.José Valim2011-05-061-6/+9
|
* removes Examples headers introduced in 9b96de6Xavier Noria2011-03-061-10/+4
| | | | | | | Example headers are discouraged in the API guidelines. Code just flows with the text. They may be good in places where there's a lot of stuff and structure may add clarity
* Some style changessuchasurge2011-03-061-0/+6
|
* Make ActiveSupport::Configurable work with modulesOriol Gual and Josep M. Bach2011-02-281-1/+1
| | | | | | [#6486 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Add comment for config_accessor methodNeeraj Singh2010-11-301-0/+12
|
* Call it compile_methods! and do the same on AM.José Valim2010-09-271-3/+3
|
* Try to use Hash's native #[] for speed.thedarkone2010-09-271-1/+1
|
* Make InheritableOptions's constructor more flexible.thedarkone2010-09-271-1/+1
|
* Compile ActionController::Base.config's methods to avoid method_missing ↵thedarkone2010-09-271-2/+22
| | | | overhead.
* Revert "Add example label to activesupport/configurable"Xavier Noria2010-08-151-2/+0
| | | | | | This reverts commit f480b2cea69247239f6fc2ad171b231595cc08c6. Reason: API guidelines discourage this, see http://edgeguides.rubyonrails.org/api_documentation_guidelines.html#example-code
* Revert "Add example label to active_support/configurable"Xavier Noria2010-08-151-0/+1
| | | | | | This reverts commit 693f770afe0e14fc1b4658ef51910d993e67dd07. Reason: to be able to revert f480b2cea69247239f6fc2ad171b231595cc08c6
* Add example label to active_support/configurableJosep M. Bach2010-08-151-1/+0
|
* Add example label to activesupport/configurableJosep M. Bach2010-08-151-0/+2
|
* Documented active_support/configurableJosep M. Bach2010-08-151-1/+20
|
* Ensure @config is not a reserved instance variable in controllers. [#5342 ↵José Valim2010-08-111-2/+2
| | | | state:resolved]
* Clean up the config object in ActionPack. Create config_accessor which just ↵José Valim2010-04-221-18/+19
| | | | delegates to the config object, reducing the number of deprecations and add specific tests.
* Start adding configuration to ActionView instead of using constants.Yehuda Katz2009-10-141-0/+35
By using config rather than hardcoded constants, we can evolve the configuration system over time (we'd just need to update the config method with more robust capabilities and all consumers would get the capabilities with no code changes)