def destroy
      note = find_note
      activity_guid = activity_for_note(note: note).guid
      note.destroy

      respond_to do |format|
        format.html { redirect_to activities_path }
        format.js do
          render :destroy, locals: { activity_guid: activity_guid }
        end
      end
    end
def destroy
      note = find_note
      activity_guid = activity_for_note(note: note).guid
      note.destroy

      respond_to do |format|
        format.html { redirect_to activities_path }
        format.js do
          render :destroy, locals: { activity_guid: activity_guid }
        end
      end
    end
DELETE /notes/1