def resource_added(resource)
      resource = initialize_resource(resource)

      if resource.saved?
        @identity_map[resource.key] = resource
        @removed.delete(resource)
      else
        set_default_attributes(resource)
      end

      resource
    end
def resource_added(resource)
      resource = initialize_resource(resource)

      if resource.saved?
        @identity_map[resource.key] = resource
        @removed.delete(resource)
      else
        set_default_attributes(resource)
      end

      resource
    end
Track the added resource

 @param [Resource] resource
   the resource that was added

 @return [Resource]
   the resource that was added

 @api private