Module: MongoMapper::Utils
- Defined in:
- lib/mongo_mapper/utils.rb
Class Method Summary collapse
Class Method Details
.get_safe_options(options) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/mongo_mapper/utils.rb', line 3 def self.() return {} unless and .key? :safe safe = [:safe] safe = {:w => 1} if safe == true safe = {:w => 0} if safe == false safe = {:w => safe} if safe.is_a? Fixnum safe end |