- 21 10月, 2012 1 次提交
-
-
由 Francesco Rodriguez 提交于
-
- 29 9月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
When inserting new records, only the fields which have been changed from the defaults will actually be included in the INSERT statement. The other fields will be populated by the database. This is more efficient, and also means that it will be safe to remove database columns without getting subsequent errors in running app processes (so long as the code in those processes doesn't contain any references to the removed column).
-
- 03 8月, 2012 1 次提交
-
-
由 Xavier Noria 提交于
-
- 16 6月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
-
- 09 6月, 2012 2 次提交
-
-
由 Santiago Pastorino 提交于
-
由 José Valim 提交于
ActiveRecord#attributes optimization: minimize objects created
-
- 28 3月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
-
- 07 3月, 2012 2 次提交
-
-
由 Jacob Green 提交于
-
由 Robin Roestenburg 提交于
-
- 06 3月, 2012 1 次提交
-
-
由 Robin Roestenburg 提交于
-
- 12 2月, 2012 1 次提交
-
-
由 Sergey Nartimov 提交于
-
- 07 2月, 2012 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 21 1月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
From 2c667f69. Thanks @pwnall for the heads-up.
-
- 14 1月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
-
- 11 1月, 2012 1 次提交
-
-
由 Tom Stuart 提交于
This reverts commit 21eadc1b.
-
- 29 12月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
This is the 'top level' connection, inherited by any models that include ActiveRecord::Model or inherit from ActiveRecord::Base.
-
- 24 12月, 2011 4 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 22 12月, 2011 1 次提交
-
-
由 Sergey Nartimov 提交于
-
- 16 12月, 2011 2 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 14 12月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 02 12月, 2011 2 次提交
-
-
由 Jon Leighton 提交于
This is good because it reduces duplication.
-
由 Jon Leighton 提交于
-
- 28 11月, 2011 1 次提交
-
-
由 Josh Susser 提交于
-
- 16 11月, 2011 1 次提交
-
-
由 Josh Susser 提交于
Instead of generating association methods directly in the model class, they are generated in an anonymous module which is then included in the model class. There is one such module for each association. The only subtlety is that the generated_attributes_methods module (from ActiveModel) must be forced to be included before association methods are created so that attribute methods will not shadow association methods.
-
- 14 9月, 2011 2 次提交
-
-
由 Jon Leighton 提交于
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.
-
由 Jon Leighton 提交于
We can just use method_defined? and private_method_defined?
-
- 13 9月, 2011 4 次提交
-
-
由 Jon Leighton 提交于
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.
-
由 Jon Leighton 提交于
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.
-
由 Jon Leighton 提交于
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.
-
由 Jon Leighton 提交于
Make sure we don't redefine an already-defined attribute method.
-
- 01 7月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 02 3月, 2011 1 次提交
-
-
由 Alexander Uvarov 提交于
Move ActiveModel::AttributeMethods#attribute_methods_generated? to ActiveRecord, so it's flexible now [#6428 state:resolved] Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 19 2月, 2011 3 次提交
-
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
- 03 12月, 2010 1 次提交
-
-
由 Michael Koziarski 提交于
Work around a strange piece of Syck behaviour where it checks Model#respond_to? before initializing the object. Things like YAML.load(YAML.dump(@post)) won't work without this.
-