lib/lita/handlers/locker_labels.rb in lita-locker-1.1.1 vs lib/lita/handlers/locker_labels.rb in lita-locker-1.2.0
- old
+ new
@@ -119,10 +119,10 @@
def show(response)
name = response.match_data['label']
return response.reply(failed(t('label.does_not_exist', name: name))) unless Label.exists?(name)
l = Label.new(name)
- return response.reply(t('label.has_no_resources', name: name)) unless l.membership.count.positive?
+ return response.reply(t('label.has_no_resources', name: name)) unless l.membership.count > 0
res = []
l.membership.each do |member|
res.push(member)
end
response.reply(t('label.resources', name: name, resources: res.join(', ')))