Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Active Record generators after Mongoid installation?

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

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

Thanks!

like image 818
Allyl Isocyanate Avatar asked Jun 16 '11 13:06

Allyl Isocyanate


2 Answers

rails g active_record:migration 
like image 139
Allyl Isocyanate Avatar answered Oct 22 '22 07:10

Allyl Isocyanate


You can config to use ActiveRecord generators in your config/application.rb

config.generators do |g| 
  g.orm :active_record 
end
like image 38
dima Ti Avatar answered Oct 22 '22 06:10

dima Ti