Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

#fix #bulkdelete, delete only when argument is a tag

  • Loading branch information...
commit e3645fbadab734e36782e07d588d40bf810a37a8 1 parent c5e0474
Rafael Magana authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  lib/dooby/core_ext.rb
  2. +1 −1  lib/dooby/list.rb
2  lib/dooby/core_ext.rb
View
@@ -15,7 +15,7 @@ def only_tags!(*wanted_tags)
def only_tags(*wanted_tags)
wanted_tags = '#' if wanted_tags.empty?
- tags = self.grep(/[#{wanted_tags}]/)
+ tags = self.grep(/[#{wanted_tags}]./)
tags.flatten
end
2  lib/dooby/list.rb
View
@@ -38,7 +38,7 @@ def bulk_delete!(terms)
matches = []
@tasks.each do |id, task|
delete! id if only_tags.all? { |tag| task.todo.include? tag }
- end
+ end unless only_tags.empty?
end
def edit!(task_id)
Please sign in to comment.
Something went wrong with that request. Please try again.