]> git.openstreetmap.org Git - rails.git/commitdiff
erblint: avoid negated if conditions
authorTom Hughes <tom@compton.nu>
Wed, 27 Mar 2019 18:49:01 +0000 (18:49 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 27 Mar 2019 18:49:01 +0000 (18:49 +0000)
.erb-lint.yml
app/views/messages/_message_summary.html.erb

index 9c3d6b0824a8df1960f1d8aa7ff6093c459836a7..390d86ca67e8119683751469488a53e64da1d851 100644 (file)
@@ -37,8 +37,6 @@ linters:
         Enabled: false # TODO
       Style/SymbolProc:
         Enabled: false # TODO
-      Style/NegatedIf:
-        Enabled: false # TODO
       Style/ConditionalAssignment:
         Enabled: false # TODO
 exclude:
index e69f43699cf037e6337f7611240e8d1340e3ac8e..057a8980a5315318add12b7224f1dd2428e4c008 100644 (file)
@@ -1,4 +1,4 @@
-<tr id="inbox-<%= message_summary.id %>" class="inbox-row<%= "-unread" if !message_summary.message_read? %>">
+<tr id="inbox-<%= message_summary.id %>" class="inbox-row<%= "-unread" unless message_summary.message_read? %>">
   <td class="inbox-sender"><%= link_to h(message_summary.sender.display_name), user_path(message_summary.sender) %></td>
   <td class="inbox-subject"><%= link_to h(message_summary.title), message_path(message_summary) %></td>
   <td class="inbox-sent"><%= l message_summary.sent_on, :format => :friendly %></td>