title: Rails 3, check if parent object is a new record but from the before_create callback of the child
body: <p>In Rails 3 is there a clean way to check if parent object is a new record but from the before_create callback of the child</p>
  
  <pre><code>class Parent
      has_many :children
  
      accepts_nested_attributes_for :children
  end
  
  class Child
    before_create :on_before_create
  
    def on_before_create
        logger.debug self.parent.new_record?  
        logger.debug self.parent.id
        logger.debug self.parent.id_was
    end
  end
  </code></pre>
  
  <p>I only want to execute code in on_before_create if the parent is not a new record
  but at the point the child is created the parent record has been inserted into the db and so it has an id, id and id_was both return the same value,
  new_record? is actually returning nothing, usually it returns a boolean</p>
  
  <p>any ideas?</p>