aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/model_schema.rb
Commit message (Collapse)AuthorAgeFilesLines
* added schema_migrations_table_name to ActiveRecord::Base in order that the ↵Jerad Phelps2013-10-271-0/+6
| | | | | | | | | | | | | | | | | | | | name of the schema migrations table can be configured. consolidated test_schema_migrations_table_name tests Added changelog entry edited changelog removed commented lines removed reader ensure the schema migrations table is reset at end of test added entry to configuration guide guides typo and changelog order
* Perf: memoize serialized column list and time zone column listSam2013-08-271-17/+27
|
* add a specific factory method rather than using newAaron Patterson2013-07-231-1/+1
|
* removes the obsolete private method column_methods_hash [Closes #11406]Xavier Noria2013-07-161-13/+0
|
* safely publish columns and columns hash infoAaron Patterson2013-03-141-1/+1
|
* Fix decorating columns for serialized attributesitzki2012-12-101-4/+3
|
* 1.9 Syntax related changesAvnerCohen2012-11-101-1/+1
|
* Remove ActiveRecord::ModelJon Leighton2012-10-261-24/+23
| | | | | | | | | | In the end I think the pain of implementing this seamlessly was not worth the gain provided. The intention was that it would allow plain ruby objects that might not live in your main application to be subclassed and have persistence mixed in. But I've decided that the benefit of doing that is not worth the amount of complexity that the implementation introduced.
* Revert "Get rid of the ActiveRecord::Model::DeprecationProxy thing."Jeremy Kemper2012-10-201-1/+1
| | | | This reverts commit 83846838252397b3781eed165ca301e05db39293.
* Get rid of the ActiveRecord::Model::DeprecationProxy thing.Jon Leighton2012-10-191-1/+1
| | | | | | | | | | | | | | | | | 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.
* Minor refactoring in Active Record model schema methodsCarlos Antonio da Silva2012-08-211-5/+3
| | | | | | * 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.
* The default value can be set once in #column_defaultsJon Leighton2012-08-171-0/+7
| | | | Rather than doing it every time an instance is instantiated.
* load active_support/concern in active_support/railsXavier Noria2012-08-021-1/+0
|
* Refactor to reset_table_nameDmitry Vorotilin2012-07-281-8/+4
|
* Simplify AR configuration code.Jon Leighton2012-06-151-9/+14
| | | | | Get rid of ActiveModel::Configuration, make better use of ActiveSupport::Concern + class_attribute, etc.
* Fix wrong return value from reset_sequence_name method.kennyj2012-04-141-1/+1
|
* Don't reset inheritance_column when setting explicitly.kennyj2012-03-081-1/+2
|
* Revert table_name= needs connection now, so just stub table_namekennyj2012-03-071-1/+1
|
* tidy up formattingJon Leighton2012-03-041-10/+11
|
* Don't clear sequence name when we explicitly assign it.kennyj2012-03-041-2/+4
|
* Fix GH #4674. Reset column information and sequence name when setting ↵kennyj2012-03-041-4/+11
| | | | table_name.
* Remove unusused variablesJon Leighton2012-03-041-9/+6
|
* give each PG type a `type` method and decortate tz attributesAaron Patterson2012-02-071-5/+17
|
* wrap and cache columns for typecastingAaron Patterson2012-02-071-3/+18
|
* call to_s on value passed to table_name=Sergey Nartimov2012-01-261-1/+1
|
* Fix table_name in ActiveRecord with more than one abstract ancestorsPiotr Sarnacki2012-01-121-3/+7
| | | | | | | | | | | | | | | | | 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
* Support establishing connection on ActiveRecord::Model.Jon Leighton2011-12-281-5/+1
| | | | | This is the 'top level' connection, inherited by any models that include ActiveRecord::Model or inherit from ActiveRecord::Base.
* Support configuration on ActiveRecord::Model.Jon Leighton2011-12-281-12/+12
| | | | | | | | | | | | | | | 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.
* Support nested AR::ModelsJon Leighton2011-12-241-1/+1
|
* Deal with global config better between AR::Base and AR::ModelJon Leighton2011-12-241-10/+10
|
* Extract common logic into a methodJon Leighton2011-12-241-5/+5
|
* I herd you like modules.Jon Leighton2011-12-241-2/+2
|
* remove deprecated set and original methods for table_name, primary_key, etcSergey Nartimov2011-12-211-55/+0
|
* Defaults hash can go on the modelJon Leighton2011-12-161-1/+1
|
* Cache columns at the model level.Jon Leighton2011-12-161-6/+7
| | | | Allows two models to use the same table but have different primary keys.
* Split out most of the AR::Base code into separate modules :cake:Jon Leighton2011-12-151-0/+361