在 Mongoid 安装后使用 Active Record 生成器? [英] Using Active Record generators after Mongoid installation?

查看:15
本文介绍了在 Mongoid 安装后使用 Active Record 生成器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过 Mongoid 集成以及项目中的 ActiveRecord 使用 MongoDB.我想为活动记录生成迁移,我运行时默认为Mongoid.

I'm using MongoDB via Mongoid integration, as well as ActiveRecord in a project. I would like to generate migrations for active record, and Mongoid is the default when I run.

rails g migration

关于如何将 AR 指定为我的迁移、模型等默认生成器的任何想法?

Any ideas how to specify AR as my default generator for migrations, models, etc?

谢谢!

推荐答案

rails g active_record:migration 

这篇关于在 Mongoid 安装后使用 Active Record 生成器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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