aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/abstract_unit.rb
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2012-01-12 20:32:11 +0100
committerPiotr Sarnacki <drogus@gmail.com>2012-01-12 20:53:01 +0100
commit0d1df723c79300b73691d7785ee87d7b74caf591 (patch)
treee4e60a3d73e0a633024c72f369bd2710f7de31f2 /railties/test/abstract_unit.rb
parentac153fe4859ec32bdbb4294d5695af25180cb617 (diff)
downloadrails-0d1df723c79300b73691d7785ee87d7b74caf591.tar.gz
rails-0d1df723c79300b73691d7785ee87d7b74caf591.tar.bz2
rails-0d1df723c79300b73691d7785ee87d7b74caf591.zip
Fix table_name in ActiveRecord with more than one abstract ancestors
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
Diffstat (limited to 'railties/test/abstract_unit.rb')
0 files changed, 0 insertions, 0 deletions