Module: MongoMapper::Plugins::Safe

Extended by:
ActiveSupport::Concern
Included in:
Document
Defined in:
lib/mongo_mapper/plugins/safe.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#save_to_collection(options = {}) ⇒ Object



22
23
24
25
# File 'lib/mongo_mapper/plugins/safe.rb', line 22

def save_to_collection(options={})
  options[:safe] = self.class.safe? unless options.key?(:safe)
  super
end