Rails working with multiple databases customize the generator | Rails, multiple databases, customize generator

In ROR working with multiple databases ( Mysql + MongoID or Postgres + MongoId ) for performance is good, but how can i give default generator database to pick-up while generating the models
edit application.rb in config folder and add below code
config.generators do |g|
g.orm             :active_record
end
So every time in next generators will take active record as default for moddels
In case of using mongoid and active record this will be helpful

Comments

Popular posts from this blog

Rails Memcache issues

Enabling password authentication for new ec2 box | ssh, ssh config, EC2 setup, new user in EC2, PasswordAuthentication

What's the difference between "include" and "require" in Ruby?