def habtm_assoc_ids(habtm_assoc)
      current = @record.send(habtm_assoc.name).to_a.map(&:id) # TODO: `pluck` would use less memory
      removed = @record.paper_trail_habtm.try(:[], habtm_assoc.name).try(:[], :removed) || []
      added = @record.paper_trail_habtm.try(:[], habtm_assoc.name).try(:[], :added) || []
      current + removed - added
    end
def habtm_assoc_ids(habtm_assoc)
      current = @record.send(habtm_assoc.name).to_a.map(&:id) # TODO: `pluck` would use less memory
      removed = @record.paper_trail_habtm.try(:[], habtm_assoc.name).try(:[], :removed) || []
      added = @record.paper_trail_habtm.try(:[], habtm_assoc.name).try(:[], :added) || []
      current + removed - added
    end
Given a HABTM association, returns an array of ids.

 @api private