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.
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
I tried the same flow in a separate project, except using only
ActiveRecord with no Mongoid and I was able to run migrations
successfully. Apparently, Mongoid is messing up my ActiveRecord
classes when I try to run rake.
Would anyone have a solution? For example, is there a similar way to
force rake to use ActiveRecord, such as when using rails-generate
(rails g active_record:***)?
By the way, I’m using ruby 1.9.2p290, Rails 3.1.0, Mongoid 2.3,
bson_ext 1.4, and devise 1.5.3.
I get a config/initializers/devise.rb file with the following setting:
require ‘devise/orm/mongoid’
However, if I run “rails g active_record:devise User”, the setting
should actually be:
require ‘devise/orm/active_record’
I would expect the mongoid ORM to be used by devise if I ran
rails g devise user
without specifying “active_record”, but I didn’t.
Unless I’m missing something, this seems like a bug in Devise. I filed
a bug with the Devise team. Hopefully I’m not wrong and just wasting
people’s time.
Thanks,
Mike
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.