在Ruby on Rails 5中禁用ActiveRecord [英] Disable ActiveRecord in Ruby on Rails 5

查看:76
本文介绍了在Ruby on Rails 5中禁用ActiveRecord的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Rails的新手。

I am a newbie in Rails.

我想在Rails 5中禁用ActiveRecord。

I want to disable ActiveRecord in Rails 5.

I已经找到了几个答案
此处此处在这里

I've already found several answers Here, Here and Here

但没有一个似乎对我有用。

But none of them seems working for me.

您能帮我解决这个问题吗?

Would you help me with this issue, please?

谢谢。

推荐答案

mechanicalfish 的这篇帖子是正确的。

Accepted answer in this post of mechanicalfish is right.

但就我而言,我还完成了另外2件事(我使用过Rails 5.1.2)

But in my case, I've done following 2 additional things (I've used Rails 5.1.2)

删除模型目录中的模型文件

models / application_record.rb

models/application_record.rb

models / widget.rb

models/widget.rb

希望这会有所帮助!

这篇关于在Ruby on Rails 5中禁用ActiveRecord的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆