You could just go into the model and change it's inheritance. I've
never used mongoid but I think that push comes to shove, simply
switching << [modeltype] wouldn't be too hard. I'll keep an eye open
for you though and see if I can figure it out.
On Jan 21, 7:41 pm, Mike Kim wrote:
I'm trying to use mongodb and postgresql simultaneously with Rails
3.1. I believe I have everything set up correctly.

What I'm interested in knowing is how to get rails to flip-flop back-
and-forth between mongoid and activerecord.

For example, if I want to generate an ActiveRecord model after using
mongoid, rails automatically defaults to the Mongoid gem.
rails g model Blogpost
invoke mongoid
create    app/models/blogpost.rb
invoke rspec
create    spec/models/blogpost_spec.rb

How would I get rails to use ActiveRecord instead, and vice versa?

Thanks in advance

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 4 | next ›
Discussion Overview
grouprubyonrails-talk @
postedJan 22, '12 at 2:42a
activeJan 24, '12 at 7:12a

2 users in discussion

Mike Kim: 3 posts Neener54: 1 post



site design / logo © 2022 Grokbase