Created
August 4, 2018 10:55
-
-
Save akaDPR/b5197fa0d06adb81e58384bd7c2e85fa to your computer and use it in GitHub Desktop.
Rails - MongoDB - Mongoid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rails with mongoDB | |
rails new your_app_name --skip-active-record | |
Install 'mongoid' ORM | |
rails g model | |
rails g controller | |
If your field in MongoDB collection is Dynamic - Use this * include Mongoid::Attributes::Dynamic * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
development:
clients:
default:
uri: <%= ENV['MONGODB_URI'] || 'mongodb://localhost:27017/local' %>
options:
connect_timeout: 15
production:
clients:
default:
uri: <%= ENV['MONGODB_URI'] %>
options:
connect_timeout: 15