The single-table inheritance mechanism failed to locate the subclass
[
2008/10/30 11:50 | by xeric ]
2008/10/30 11:50 | by xeric ]
The single-table inheritance mechanism failed to locate the subclass: ......
......
基本上,十之八九就是有个字段被命名为type了,type属于ActiveRecord保留的属性,还是别用了。
最简单的办法,字段改名吧,改不了名,那这个英文也许能帮你:
This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Site.inheritance_column to use another column for that information.
让你去修改这个属性,挑个另外一个字段来存储继承信息,还是看需求了。
如果你的表是从其他应用迁移过来,并且很多地方都依赖这个名字,那建议还是修改这个属性,否则,改名吧。。。
......
基本上,十之八九就是有个字段被命名为type了,type属于ActiveRecord保留的属性,还是别用了。
最简单的办法,字段改名吧,改不了名,那这个英文也许能帮你:
This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Site.inheritance_column to use another column for that information.
让你去修改这个属性,挑个另外一个字段来存储继承信息,还是看需求了。
如果你的表是从其他应用迁移过来,并且很多地方都依赖这个名字,那建议还是修改这个属性,否则,改名吧。。。
RubyGems 1.3 fails on windows (undefined method `uid' for nil:NilClass)


请问博主能不能把你现在默认的风格给我一份呀?呵呵。。谢谢了
franklight@vip.qq.com