views:

89

answers:

1

I have some objects which happen to be nested_attributes of something else. When they are marked to be deleted, Rails creates a property "marked_for_destruction". How do I read this var?

Sample Yaml dump:

--- &id001 !ruby/object:LineItem 
attributes: 
  name:Pay
  created_at: 2009-10-12 16:30:51
  updated_at: 2009-10-12 16:30:51
  statement_id: "8"
  amount: "234"
  id: "33"
attributes_cache: {}

errors: !ruby/object:ActiveRecord::Errors 
  base: *id001
  errors: {}

marked_for_destruction: true
A: 
Object.marked_for_destruction?
Neil Middleton