Created
November 20, 2017 09:33
-
-
Save bernardobarreto/dd2a731c84aae2600976de8df5ca65a8 to your computer and use it in GitHub Desktop.
mongodb model using secondary client and database with sharding example
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
class Url | |
include Mongoid::Document | |
store_in database: 'db2_development', client: 'secondary' | |
shard_key :id | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment