added delete with predicate function to ActiveRecord