Module: DataMapper::NestedAttributes::CommonInstanceMethods

Defined in:
lib/dm-accepts_nested_attributes/nested_attributes.rb

Instance Method Summary collapse

Instance Method Details

#mark_for_destructionObject



344
345
346
# File 'lib/dm-accepts_nested_attributes/nested_attributes.rb', line 344

def mark_for_destruction
  @marked_for_destruction = true
end

#marked_for_destruction?Boolean

Returns:

  • (Boolean)


340
341
342
# File 'lib/dm-accepts_nested_attributes/nested_attributes.rb', line 340

def marked_for_destruction?
  @marked_for_destruction
end

#reloadObject

Reloads the attributes of the object as usual and removes a mark for destruction.



335
336
337
338
# File 'lib/dm-accepts_nested_attributes/nested_attributes.rb', line 335

def reload
  @marked_for_destruction = false
  super
end