aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/class
Commit message (Collapse)AuthorAgeFilesLines
...
* Move require closer to homeJeremy Kemper2010-03-171-0/+1
|
* fixing activerecord tests [#4205 state:resolved]Aaron Patterson2010-03-171-2/+2
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Fix some more warnings on 1.9wycats2010-03-171-0/+2
|
* Remove some 1.9 warnings (resulting in some fixed bugs). Remaining AM ↵wycats2010-03-171-0/+3
| | | | warnings are in dependencies.
* class_attribute gets instance methods which delegate to but may override ↵Jeremy Kemper2010-03-081-2/+23
| | | | their class values as you'd expect. Disable instance writer methods with :instance_writer => false.
* Use Object#singleton_class instead of #metaclass. Prefer Ruby's choice.Jeremy Kemper2010-02-252-11/+12
|
* moves Class#reachable? to Module#reachable?, bases implementation on ↵Xavier Noria2010-02-111-6/+3
| | | | anonymous? and constantize, and adds test coverage
* Reinstate Object.subclasses_of and Class#descendents for plugin compat.Jeremy Kemper2010-02-091-0/+58
| | | | This reverts commits 7d312e54bad9c39634c137caec07dfc8df471650, 5f981ff0294ba45aa44ad15aa063970b29aeec44, f85f5dfc8ffefff174b695c6363211d342f77a57, 245bfafe335ff883f7a096eab95ac22fe2848679, and ec7c642f5fe60afc857aa64f1a9b4c2be56f9d70
* Introduce class_attribute to declare inheritable class attributes. Writing ↵Jeremy Kemper2010-02-011-0/+36
| | | | an attribute on a subclass behaves just like overriding the superclass reader method. Unifies and replaces most usage of cattr_accessor, class_inheritable_attribute, superclass_delegating_attribute, and extlib_inheritable_attribute.
* superclass_delegating_accessor rewritten to serve as the base for many other ↵Yehuda Katz2010-01-291-53/+27
| | | | kinds of accessors (step 1 of unification)
* deletes no void files removal.rb and class_test.rbXavier Noria2010-01-261-5/+0
|
* removes unused method Class#remove_classXavier Noria2010-01-261-31/+0
|
* removes unused method Class#reachable?Xavier Noria2010-01-261-5/+0
|
* removes unused Class#remove_subclassesXavier Noria2010-01-261-9/+0
|
* removes unused method Class#subclassesXavier Noria2010-01-261-7/+0
|
* delegating_attributes.rb does not use duplicableXavier Noria2010-01-011-1/+0
|
* Fix inheritance issue with new callbacks.José Valim2010-01-011-1/+2
|
* Extract descendents a bit so it can take advantage of Rubinius' __subclasses__.Yehuda Katz2009-12-131-1/+5
|
* Allow :instance_reader to be given to superclass_delegating_accessor as well.José Valim2009-11-011-21/+39
|
* Missed cherry-pick from 2e37effd7203cad84459661e11db2be44586cb4fJeremy Kemper2009-10-191-0/+1
|
* Unify class_inheritable_accessor and extlib_inheritable_accessor and allow ↵José Valim2009-10-171-12/+16
| | | | responder to be set in the class level.
* Allow superclass_delegating_accessor to take a block for initial set.Yehuda Katz2009-08-111-3/+4
|
* Got overhead down from 127 to 85. All tests pass:Yehuda Katz2009-08-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * Tentatively replaced HeaderHash with SimpleHeaderHash, which does not preserve case but does handle converting Arrays to Strings in to_hash. This requires further discussion. * Moved default_charset to ActionDispatch::Response to avoid having to hop over to ActionController. Ideally, this would be a constant on AD::Response, but some tests expect to be able to change it dynamically and I didn't want to change them yet. * Completely override #initialize from Rack::Response. Previously, it was creating a HeaderHash, and then we were creating an entirely new one. There is no way to call super without incurring the overhead of creating a HeaderHash. * Override #write from Rack::Response. Its implementation tracks Content-Length, and doing so adds additional overhead that could be mooted if other middleware changes the body. It is more efficiently done at the top-level server. * Change sending_file to an instance_variable instead of header inspection. In general, if a state is important, it should be set as a property of the response not reconstructed later. * Set the Etag to @body instead of .body. AS::Cache.expand_cache_key handles Arrays fine, and it's more efficient to let it handle the body parts, since it is not forced to create a joined String. * If we detect the default cache control case, just set it, rather than setting the constituent parts and then running the normal (expensive) code to generate the string.
* Simplify callbacks to use less metaprogrammingYehuda Katz2009-06-021-2/+4
|
* Fix dependencies revealed by testing in isolationJeremy Kemper2009-04-222-1/+6
|
* Fix tests on 1.9Jeremy Kemper2009-04-222-1/+3
|
* Opt in to DependenciesJeremy Kemper2009-04-221-0/+2
|
* Merge branch 'master' into cherryJeremy Kemper2009-04-203-18/+97
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: activesupport/CHANGELOG activesupport/lib/active_support/core_ext/class/delegating_attributes.rb activesupport/lib/active_support/core_ext/hash/conversions.rb activesupport/lib/active_support/core_ext/module/attribute_accessors.rb activesupport/lib/active_support/core_ext/string/multibyte.rb activesupport/lib/active_support/core_ext/time/calculations.rb activesupport/lib/active_support/deprecation.rb
| * Helpers with an initial testYehuda Katz2009-03-031-3/+3
| |
| * First, very early, AbstractController code. More to comeYehuda Katz2009-02-241-0/+79
| |
| * Sync with rails/rails/master, merge two metaprogramming annotation effortsMichael S. Klishin2008-12-283-67/+68
| |\
| * | Annotated metaprogramming code across ActiveSupportMichael S. Klishin2008-12-283-73/+73
| | |
* | | Indentation, superfluous selfJeremy Kemper2009-03-241-25/+25
| |/ |/|
* | Inline code comments for class_eval/module_eval [#1657 state:resolved]Xavier Noria2008-12-283-77/+78
|/ | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Whitespace.Clemens Kofler2008-09-031-5/+5
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Use #duplicable? instead of anonymous rescueJeremy Kemper2008-05-121-1/+1
|
* Improve documentation coverage and markupXavier Noria2008-05-021-1/+7
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Improve documentation.Pratik Naik2008-04-051-8/+25
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9226 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add query methods for superclass_delegating_readerJeremy Kemper2008-03-311-1/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9156 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve documentation.Pratik Naik2008-03-261-0/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9093 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add new superclass_delegating_accessors. Similar to class inheritable ↵Michael Koziarski2007-10-291-0/+40
| | | | | | attributes but with subtly different semantics. [Koz, tarmo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8056 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Some 1.9 forward compatibilityJeremy Kemper2007-09-141-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7474 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactored in use of extract_options! (closes #9079) [josh]David Heinemeier Hansson2007-07-242-4/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7220 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fix problem with EMPTY_INHERITABLE_ATTRIBUTES being redefinedRick Olson2007-02-041-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6115 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fix #write_inheritable_attribute bug that crept inRick Olson2007-02-041-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6111 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Optimize Class Inheritable Attributes so that unnecessary hashes are not ↵Rick Olson2007-02-041-5/+14
| | | | | | created. Closes #7472 [Bruce Perens] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6110 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :instance_writer option to #mattr_writer/accessor, ↵Rick Olson2007-01-282-0/+14
| | | | | | #cattr_writer/accessor, and #class_inheritable_writer to skip the creation of the instance writer. [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6050 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix issue with #class_inheritable_accessor saving updates to the parent ↵Rick Olson2006-10-021-1/+6
| | | | | | class when initialized with an Array or Hash [mojombo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5218 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove ::Controllers related cruft; fix AP testsNicholas Seckar2006-02-261-5/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed Class.remove to not blow up on inheritanceDavid Heinemeier Hansson2006-02-041-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3532 5ecf4fe2-1ee6-0310-87b1-e25e094e27de