Rails 由于在数据库表中有`model_name`,导致 ActiveRecord::Relation 以及方法全都不可用

zealinux · June 24, 2019 · Last by w7938940 replied at June 24, 2019 · 2237 hits
ActiveRecord::DangerousAttributeError 
  (model_name is defined by Active Record. 
    Check to make sure that you don't have an attribute or method with the same name.)

数据库表中有 model_name (不是 Rails 建的,是原有的表)

但是想用 Rails 写了项目(主要是用来迁移数据)

但是遇到这个问题有点头疼。暂时没有找到方法解决。

You need to Sign in before reply, if you don't have an account, please Sign up first.