2.1のSTI

変わった。
後で確認しよう

class CollectionItem < ActiveRecord::Base
end
class ComicColletion::Item < CollectionItem
end

item = ComicCollection::Item.new
item.type # => 'Item'

item2 = CollectionItem.find(item.id)
#returns an error, because it can't find
#the class Item

ActiveRecord::Base.stor_full_sti_class = true

Its default value is true.