1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

14 commits

Author SHA1 Message Date
Jon Leighton
ae3767c799 Fix observers with AR::Model 2012-06-15 19:15:37 +01:00
Jon Leighton
e030f26ad3 Simplify AR configuration code.
Get rid of ActiveModel::Configuration, make better use of
ActiveSupport::Concern + class_attribute, etc.
2012-06-15 19:15:36 +01:00
Carlos Antonio da Silva
a8dd21d8b4 Remove IdentityMap 2012-03-13 20:08:54 -03:00
Jon Leighton
88d2af5be4 Delete some stray lines 2011-12-28 18:44:15 +00:00
Jon Leighton
dae7b65453 Support establishing connection on ActiveRecord::Model.
This is the 'top level' connection, inherited by any models that include
ActiveRecord::Model or inherit from ActiveRecord::Base.
2011-12-28 18:27:41 +00:00
Jon Leighton
93c1f11c0a Support configuration on ActiveRecord::Model.
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.
2011-12-28 18:27:41 +00:00
Jon Leighton
deb91690ae Intercept sends in Model::DeprecationProxy 2011-12-24 14:48:44 +00:00
Jon Leighton
a5fa310f40 Fix position of load hook so that Base has been defined and included Model before it runs 2011-12-24 12:30:17 +00:00
Jon Leighton
00318e9bdf Add some doc for ActiveRecord::Model 2011-12-24 11:28:03 +00:00
Jon Leighton
800f0a6eb6 Add deprecation for the change to the active_record load hook 2011-12-24 11:08:16 +00:00
Jon Leighton
13945b06cc Don't include anything else if AR::Model has already been included 2011-12-24 11:08:16 +00:00
Jon Leighton
ba7ec73f6a Deal with global config better between AR::Base and AR::Model 2011-12-24 11:08:15 +00:00
Jon Leighton
6af7192af5 I herd you like modules. 2011-12-24 11:08:15 +00:00
Jon Leighton
b2c9ce341a Start work towards making AR include-able. 2011-12-24 11:08:15 +00:00