Please sign in to comment.
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
- Loading branch information...
Showing with 18 additions and 3 deletions.