OSDN Git Service

Invert "unless .empty?" to "if .present?"; unless-else is evil.
authorRobb Kidd <robb@thekidds.org>
Mon, 18 Jun 2012 21:52:16 +0000 (17:52 -0400)
committerRobb Kidd <robb@thekidds.org>
Mon, 18 Jun 2012 22:32:46 +0000 (18:32 -0400)
app/views/merge_requests/_commits.html.haml

index 441a7f3..49c8e8c 100644 (file)
@@ -1,4 +1,4 @@
-- unless @commits.empty?
+- if @commits.present?
   .ui-box
     %h5 Commits (#{@commits.count})
     .merge-request-commits