Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Support establishing connection on ActiveRecord::Model. | Jon Leighton | 2011-12-28 | 1 | -1/+1 |
| | | | | | This is the 'top level' connection, inherited by any models that include ActiveRecord::Model or inherit from ActiveRecord::Base. | ||||
* | Ensure attribute methods are included after all the AR stuff | Jon Leighton | 2011-12-24 | 1 | -1/+1 |
| | |||||
* | Extract common logic into a method | Jon Leighton | 2011-12-24 | 1 | -1/+1 |
| | |||||
* | Fix situation where id method didn't get defined causing postgres to fail | Jon Leighton | 2011-12-23 | 1 | -4/+3 |
| | |||||
* | Fix #4046. | Jon Leighton | 2011-12-23 | 1 | -42/+33 |
| | |||||
* | remove deprecated underscore versions of attribute methods | Sergey Nartimov | 2011-12-21 | 1 | -1/+0 |
| | |||||
* | Let AttributeMethods do its own including etc | Jon Leighton | 2011-12-15 | 1 | -0/+23 |
| | |||||
* | Split out most of the AR::Base code into separate modules :cake: | Jon Leighton | 2011-12-15 | 1 | -2/+113 |
| | |||||
* | Use a separate module for 'external' attribute methods. | Jon Leighton | 2011-12-14 | 1 | -0/+14 |
| | |||||
* | Remove the need for type_cast_attribute. | Jon Leighton | 2011-12-01 | 1 | -0/+4 |
| | | | | This is good because it reduces duplication. | ||||
* | Remove unnecessary *args | Jon Leighton | 2011-12-01 | 1 | -2/+2 |
| | |||||
* | Stop trying to be clever about when to define attribute methods. | Jon Leighton | 2011-09-14 | 1 | -10/+1 |
| | | | | | | | | | There is no meaningful performance penalty in defining attribute methods, since it only happens once. There is also no reason *not* to define them, since they get thrown in an included module, so they will not 'overwrite' anything. In fact, this is desirable, since it allows us to call super. | ||||
* | We don't need to build a set for DangerousAttributeError. | Jon Leighton | 2011-09-14 | 1 | -7/+13 |
| | | | | We can just use method_defined? and private_method_defined? | ||||
* | Deprecate using method_missing for attributes that are columns. | Jon Leighton | 2011-09-13 | 1 | -0/+15 |
| | | | | | | This shouldn't ever happen unless people are doing something particularly weird, but adding a deprecation in case there are bugs not caught by our tests. | ||||
* | Let Ruby deal with method visibility. | Jon Leighton | 2011-09-13 | 1 | -7/+10 |
| | | | | | | Check respond_to_without_attributes? in method_missing. If there is any method that responds (even private), let super handle it and raise NoMethodError if necessary. | ||||
* | Always generate attribute methods on the base class. | Jon Leighton | 2011-09-13 | 1 | -5/+18 |
| | | | | | | | | | | | | | | This fixes a situation I encountered where a subclass would cache the name of a generated attribute method in @_defined_class_methods. Then, when the superclass has it's attribute methods undefined, the subclass would always have to dispatch through method_missing, because the presence of the attribute in @_defined_class_methods would mean that it is never generated again, even if undefine_attribute_methods is called on the subclass. There various other confusing edge cases like this. STI classes share columns, so let's just keep all the attribute method generation state isolated to the base class. | ||||
* | Fix warnings. | Jon Leighton | 2011-09-13 | 1 | -1/+1 |
| | | | | Make sure we don't redefine an already-defined attribute method. | ||||
* | match method signature of the superclass | Aaron Patterson | 2011-06-30 | 1 | -1/+1 |
| | |||||
* | Move ActiveModel::AttributeMethods#attribute_methods_generated? to ↵ | Alexander Uvarov | 2011-03-01 | 1 | -0/+11 |
| | | | | | | | | ActiveRecord, so it's flexible now [#6428 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | instance_methods includes public and protected, so reduce funcalls and ↵ | Aaron Patterson | 2011-02-18 | 1 | -3/+2 |
| | | | | object allocs | ||||
* | AR::AttributeMethods does not need to be included in an AR::Base class. | Aaron Patterson | 2011-02-18 | 1 | -1/+5 |
| | |||||
* | just use the list of column names to generate attribute methods | Aaron Patterson | 2011-02-18 | 1 | -1/+1 |
| | |||||
* | Work around a strange piece of Syck behaviour where it checks ↵ | Michael Koziarski | 2010-12-02 | 1 | -1/+1 |
| | | | | | | Model#respond_to? before initializing the object. Things like YAML.load(YAML.dump(@post)) won't work without this. | ||||
* | "instance_methods" includes public and protected | Aaron Patterson | 2010-10-19 | 1 | -1/+1 |
| | |||||
* | Cheaper attribute reads and respond_to?. Add underscore-prefixed method ↵ | Jeremy Kemper | 2010-09-09 | 1 | -2/+2 |
| | | | | aliased to the attribute name so it can be overridden but still called internally. | ||||
* | Adds title and basic description where needed. | Rizwan Reza | 2010-06-15 | 1 | -0/+1 |
| | |||||
* | eliminate alias_method_chain from ActiveRecord | wycats | 2010-05-09 | 1 | -1/+10 |
| | |||||
* | No need to check for generated method, just redispatch | Jeremy Kemper | 2009-11-14 | 1 | -4/+3 |
| | |||||
* | Extract generic attribute method generation to AMo | Joshua Peek | 2009-08-04 | 1 | -241/+10 |
| | |||||
* | whitespace | Joshua Peek | 2009-08-04 | 1 | -5/+5 |
| | |||||
* | Modified ActiveRecord::AttributeMethods to allow classes to specify ↵ | Paul Gillard | 2009-08-04 | 1 | -37/+117 |
| | | | | | | attribute method prefixes and/or suffixes. Previously only suffixes were allowed. Signed-off-by: Joshua Peek <josh@joshpeek.com> | ||||
* | Track generated attribute methods in a separate module | Joshua Peek | 2009-08-02 | 1 | -30/+14 |
| | |||||
* | Start separating primary key concerns | Joshua Peek | 2009-07-30 | 1 | -0/+30 |
| | |||||
* | Make sure we use send for the default attribute method body because the ↵ | Joshua Peek | 2009-07-30 | 1 | -1/+1 |
| | | | | suffix maybe an invalid method name | ||||
* | Make sure to reset defined methods after calling attribute_method_suffix | Joshua Peek | 2009-07-30 | 1 | -9/+7 |
| | |||||
* | Move attribute_types_cached_by_default into attribute methods reading concern | Joshua Peek | 2009-07-30 | 1 | -10/+0 |
| | |||||
* | Don't need to pass attr_name to evaluate_attribute_method anymore | Joshua Peek | 2009-07-30 | 1 | -4/+4 |
| | |||||
* | Undefine id and let it automatically be generated | Joshua Peek | 2009-07-30 | 1 | -4/+4 |
| | |||||
* | Redirect method missing for primary key to read_attribute | Joshua Peek | 2009-07-30 | 1 | -3/+1 |
| | |||||
* | ditto for id= | Joshua Peek | 2009-07-30 | 1 | -3/+3 |
| | |||||
* | Don't define id_before_type_cast, just let it be generated on its own | Joshua Peek | 2009-07-30 | 1 | -1/+1 |
| | |||||
* | Restore DangerousAttributeError | Joshua Peek | 2009-07-30 | 1 | -3/+9 |
| | |||||
* | Wrap up attribute method reset concerns in 'undefine_attribute_methods' | Joshua Peek | 2009-07-30 | 1 | -0/+5 |
| | |||||
* | read_attribute is always available through attribute | Joshua Peek | 2009-07-30 | 1 | -7/+1 |
| | |||||
* | cache_attributes is related to attribute reading | Joshua Peek | 2009-07-30 | 1 | -19/+0 |
| | |||||
* | Generate methods for all suffixes | Joshua Peek | 2009-07-30 | 1 | -11/+4 |
| | |||||
* | Concernify AR AttributeMethods | Joshua Peek | 2009-07-30 | 1 | -195/+19 |
| | |||||
* | Make it so AR attributes which conflict with object-private methods (e.g. ↵ | Sam Goldstein | 2009-07-09 | 1 | -4/+9 |
| | | | | | | | | | system) don't 'randomly' cause NoMethodErrors Previously if you called this attribute before others, you'd get exceptions. But if it was the second-or-subsequent attribute you retrieved you'd get the correct behaviour. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#2808 state:committed] | ||||
* | Break up DependencyModule's dual function of providing a "depend_on" DSL and ↵ | Joshua Peek | 2009-05-28 | 1 | -1/+1 |
| | | | | "included" block DSL into separate modules. But, unify both approaches under AS::Concern. | ||||
* | Merge commit 'origin/master' | Yehuda Katz + Carl Lerche | 2009-05-14 | 1 | -3/+3 |
| | | | | | | Conflicts: actionpack/lib/action_controller/abstract/base.rb actionpack/lib/action_controller/routing.rb |