Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade straggler connection references.
Upgrade safe semantics to be consistent with the new MongoClient safe semantics - legacy usage (:safe => true) is transparently upgraded to the new system. BIG CHANGE: In keeping with the driver defaults, safety is now ON by default (:w => 1) rather than off by default. Use `safe false` to turn off safety in a model. Fixed tests.
- Loading branch information
Showing
7 changed files
with
31 additions
and
11 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module MongoMapper | ||
module Utils | ||
def self.get_safe_options(options) | ||
safe = options[:safe] | ||
safe = {:w => 1} if safe == true or safe.nil? | ||
safe = {:w => 0} if safe == false | ||
safe = {:w => safe} if safe.is_a? Fixnum | ||
safe | ||
end | ||
end | ||
end |
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
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