I want to create SAAS application in Ruby on rails. So, that every account have different database. I have found apartment gem but it is not working with mongomapper. Is there any multi tenant gem that works with mongomapper?
I have also tried with following code in the model:
key :name, String
key :email, String, :required => true
key :username, String, :required => true, :unique => true
You can use
MongoMapper.database = "my_db" from your controller. It will create new my_db database or if its already created then switch to that.