aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/model_schema.rb
Commit message (Collapse)AuthorAgeFilesLines
* Allow global override of default STI inheritance columnchapmajs2013-06-261-1/+1
| | | | | | This change fixes a bug by which 3.2-STABLE users can't globally override the default STI inheritance column with `ActiveRecord::Base.inheritance_column = 'some_column'`. 3.2-STABLE users are forced to use a deprecated method or monkey patch it otherwise. Test case written by tkhr <takehiro0740@gmail.com>.
* Don't reset inheritance_column when setting explicitly.Fred Wu2013-03-271-1/+3
| | | This is backported from master (cdfcbc4).
* call to_s on value passed to table_name=Sergey Nartimov2012-01-261-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* 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
* 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