Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | More documentation to class_attribute. | José Valim | 2010-07-28 | 1 | -11/+24 |
| | |||||
* | adding comment specifying that cattr_accessor also supports instance_write ↵ | Neeraj Singh | 2010-07-28 | 1 | -0/+10 |
| | | | | and instance_rader option | ||||
* | clarifying the instance_write option with an example | Neeraj Singh | 2010-07-28 | 1 | -1/+5 |
| | |||||
* | adding some comments to cattr_accessor method | Neeraj Singh | 2010-07-28 | 1 | -0/+6 |
| | |||||
* | updating description of how class_attribute works | Neeraj Singh | 2010-07-28 | 1 | -0/+5 |
| | |||||
* | clarifying description for class_attribute method | Neeraj Singh | 2010-07-27 | 1 | -2/+2 |
| | |||||
* | polishing comments | Neeraj Singh | 2010-07-26 | 1 | -3/+3 |
| | |||||
* | Define a convention for descendants and subclasses. | José Valim | 2010-07-05 | 1 | -31/+26 |
| | | | | | | The former should be symmetric with ancestors and include all children. However, it should not include self since ancestors + descendants should not have duplicated. The latter is symmetric to superclass in the sense it only includes direct children. By adopting a convention, we expect to have less conflict with other frameworks, as Datamapper. For this moment, to ensure ActiveModel::Validations can be used with Datamapper, we should always call ActiveSupport::DescendantsTracker.descendants(self) internally instead of self.descendants avoiding conflicts. | ||||
* | removed 'unless const_defined?' code smell | Josh Kalderimis | 2010-06-21 | 1 | -1/+1 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Change callbacks to automatically include DescendantsTracker and rename ↵ | José Valim | 2010-06-19 | 1 | -5/+5 |
| | | | | descendents to descendants. | ||||
* | refactor evals and adds some __FILE__ and __LINE__ | Santiago Pastorino | 2010-05-20 | 1 | -4/+1 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | in Ruby things in general happen at runtime, no need to specify that | Xavier Noria | 2010-05-19 | 1 | -2/+3 |
| | |||||
* | Updating the doc with the info that class_inheritable_accessor | Neeraj Singh | 2010-05-19 | 1 | -0/+2 |
| | | | | copies properties to child at runtime | ||||
* | Not using class_eval wasn't adding clarity here | wycats | 2010-04-10 | 1 | -15/+24 |
| | |||||
* | moves Object#singleton_class to Kernel#singleton_class to match Ruby also ↵ | Xavier Noria | 2010-04-05 | 2 | -2/+2 |
| | | | | there, same for #class_eval to simplify, and adds coverage for class_eval | ||||
* | Fix class_attribute so that it works with singleton classes. | Carl Lerche | 2010-04-01 | 1 | -1/+1 |
| | |||||
* | LINE on class_eval need + 1, also removed comments [#4281 state:committed] | Santiago Pastorino | 2010-03-27 | 1 | -24/+27 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | flatten not needed here | Santiago Pastorino | 2010-03-27 | 1 | -2/+2 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | fixing inconsistency with cattr_reader and matter_reader [#4172 state:resolved] | Kabari Hendrick | 2010-03-27 | 1 | -5/+8 |
| | | | Signed-off-by: wycats <wycats@gmail.com> | ||||
* | Move require closer to home | Jeremy Kemper | 2010-03-17 | 1 | -0/+1 |
| | |||||
* | fixing activerecord tests [#4205 state:resolved] | Aaron Patterson | 2010-03-17 | 1 | -2/+2 |
| | | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Fix some more warnings on 1.9 | wycats | 2010-03-17 | 1 | -0/+2 |
| | |||||
* | Remove some 1.9 warnings (resulting in some fixed bugs). Remaining AM ↵ | wycats | 2010-03-17 | 1 | -0/+3 |
| | | | | warnings are in dependencies. | ||||
* | class_attribute gets instance methods which delegate to but may override ↵ | Jeremy Kemper | 2010-03-08 | 1 | -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 Kemper | 2010-02-25 | 2 | -11/+12 |
| | |||||
* | moves Class#reachable? to Module#reachable?, bases implementation on ↵ | Xavier Noria | 2010-02-11 | 1 | -6/+3 |
| | | | | anonymous? and constantize, and adds test coverage | ||||
* | Reinstate Object.subclasses_of and Class#descendents for plugin compat. | Jeremy Kemper | 2010-02-09 | 1 | -0/+58 |
| | | | | This reverts commits 7d312e54bad9c39634c137caec07dfc8df471650, 5f981ff0294ba45aa44ad15aa063970b29aeec44, f85f5dfc8ffefff174b695c6363211d342f77a57, 245bfafe335ff883f7a096eab95ac22fe2848679, and ec7c642f5fe60afc857aa64f1a9b4c2be56f9d70 | ||||
* | Introduce class_attribute to declare inheritable class attributes. Writing ↵ | Jeremy Kemper | 2010-02-01 | 1 | -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 Katz | 2010-01-29 | 1 | -53/+27 |
| | | | | kinds of accessors (step 1 of unification) | ||||
* | deletes no void files removal.rb and class_test.rb | Xavier Noria | 2010-01-26 | 1 | -5/+0 |
| | |||||
* | removes unused method Class#remove_class | Xavier Noria | 2010-01-26 | 1 | -31/+0 |
| | |||||
* | removes unused method Class#reachable? | Xavier Noria | 2010-01-26 | 1 | -5/+0 |
| | |||||
* | removes unused Class#remove_subclasses | Xavier Noria | 2010-01-26 | 1 | -9/+0 |
| | |||||
* | removes unused method Class#subclasses | Xavier Noria | 2010-01-26 | 1 | -7/+0 |
| | |||||
* | delegating_attributes.rb does not use duplicable | Xavier Noria | 2010-01-01 | 1 | -1/+0 |
| | |||||
* | Fix inheritance issue with new callbacks. | José Valim | 2010-01-01 | 1 | -1/+2 |
| | |||||
* | Extract descendents a bit so it can take advantage of Rubinius' __subclasses__. | Yehuda Katz | 2009-12-13 | 1 | -1/+5 |
| | |||||
* | Allow :instance_reader to be given to superclass_delegating_accessor as well. | José Valim | 2009-11-01 | 1 | -21/+39 |
| | |||||
* | Missed cherry-pick from 2e37effd7203cad84459661e11db2be44586cb4f | Jeremy Kemper | 2009-10-19 | 1 | -0/+1 |
| | |||||
* | Unify class_inheritable_accessor and extlib_inheritable_accessor and allow ↵ | José Valim | 2009-10-17 | 1 | -12/+16 |
| | | | | responder to be set in the class level. | ||||
* | Allow superclass_delegating_accessor to take a block for initial set. | Yehuda Katz | 2009-08-11 | 1 | -3/+4 |
| | |||||
* | Got overhead down from 127 to 85. All tests pass: | Yehuda Katz | 2009-08-11 | 1 | -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 metaprogramming | Yehuda Katz | 2009-06-02 | 1 | -2/+4 |
| | |||||
* | Fix dependencies revealed by testing in isolation | Jeremy Kemper | 2009-04-22 | 2 | -1/+6 |
| | |||||
* | Fix tests on 1.9 | Jeremy Kemper | 2009-04-22 | 2 | -1/+3 |
| | |||||
* | Opt in to Dependencies | Jeremy Kemper | 2009-04-22 | 1 | -0/+2 |
| | |||||
* | Merge branch 'master' into cherry | Jeremy Kemper | 2009-04-20 | 3 | -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 test | Yehuda Katz | 2009-03-03 | 1 | -3/+3 |
| | | |||||
| * | First, very early, AbstractController code. More to come | Yehuda Katz | 2009-02-24 | 1 | -0/+79 |
| | | |||||
| * | Sync with rails/rails/master, merge two metaprogramming annotation efforts | Michael S. Klishin | 2008-12-28 | 3 | -67/+68 |
| |\ |