ruby中,使用activerecord生产的数据访问类,结果出现如标题的错误
“This error is raised because the column 'type' is reserved for storing the class in case of inheritance”
google了下,原来是表中有type这个字段,而type应该是被ruby或者是activerecord作为一个保留字之类的,所以出现这个错误
需要的做法是,给改个别名来访问
end
end
这样基本可以搞定