- 20 10月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
I think it's going to be too much pain to try to transition the :active_record load hook from executing against Base to executing against Model. For example, after Model is included in Base, and modules included in Model will no longer get added to the ancestors of Base. So plugins which wish to be compatible with both Model and Base should use the :active_record_model load hook which executes *before* Base gets loaded. In general, ActiveRecord::Model is an advanced feature at the moment and probably most people will continue to inherit from ActiveRecord::Base for the time being.
-
- 21 8月, 2012 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
* Use each_key instead of generating intermediate keys array. * Use each_with_object instead of inject to build hash. * Use ternary to return instead of if + assignment.
-
- 18 8月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
Rather than doing it every time an instance is instantiated.
-
- 03 8月, 2012 1 次提交
-
-
由 Xavier Noria 提交于
-
- 28 7月, 2012 1 次提交
-
-
由 Dmitry Vorotilin 提交于
-
- 16 6月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
Get rid of ActiveModel::Configuration, make better use of ActiveSupport::Concern + class_attribute, etc.
-
- 13 4月, 2012 1 次提交
-
-
由 kennyj 提交于
-
- 07 3月, 2012 2 次提交
- 05 3月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
-
- 04 3月, 2012 3 次提交
-
-
由 kennyj 提交于
-
由 kennyj 提交于
-
由 Jon Leighton 提交于
-
- 08 2月, 2012 2 次提交
-
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
- 26 1月, 2012 1 次提交
-
-
由 Sergey Nartimov 提交于
-
- 13 1月, 2012 1 次提交
-
-
由 Piotr Sarnacki 提交于
When subclassing abstract_class table_name should be always computed based on class name, no matter if superclass is subclassing base or another abstract_class. So: class FirstAbstract < ActiveRecord::Base self.abstract_class = true end class SecondAbstract < FirstAbstract self.abstract_class = true end class Post < SecondAbstract self.table_name #=> 'posts' (not 'second_abstracts') end
-
- 29 12月, 2011 2 次提交
-
-
由 Jon Leighton 提交于
This is the 'top level' connection, inherited by any models that include ActiveRecord::Model or inherit from ActiveRecord::Base.
-
由 Jon Leighton 提交于
The problem: We need to be able to specify configuration in a way that can be inherited to models that include ActiveRecord::Model. So it is no longer sufficient to put 'top level' config on ActiveRecord::Base, but we do want configuration specified on ActiveRecord::Base and descendants to continue to work. So we need something like class_attribute that can be defined on a module but that is inherited when ActiveRecord::Model is included. The solution: added ActiveModel::Configuration module which provides a config_attribute macro. It's a bit specific hence I am not putting this in Active Support or making it a 'public API' at present.
-
- 24 12月, 2011 4 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 22 12月, 2011 1 次提交
-
-
由 Sergey Nartimov 提交于
-
- 16 12月, 2011 3 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
Allows two models to use the same table but have different primary keys.
-
由 Jon Leighton 提交于
-