Commit 4b6701057526db5d5bac974b7b0f9061d493ac20

Authored by Laust Rud Jacobsen
1 parent 8cc1085f
Exists in master and in 1 other branch production

Rubocop: fix use of "if !"

.rubocop_todo.yml
... ... @@ -335,12 +335,6 @@ Style/MultilineBlockLayout:
335 335 Style/MultilineOperationIndentation:
336 336 Enabled: false
337 337  
338   -# Offense count: 1
339   -# Cop supports --auto-correct.
340   -Style/NegatedIf:
341   - Exclude:
342   - - 'app/controllers/apps_controller.rb'
343   -
344 338 # Offense count: 2
345 339 # Cop supports --auto-correct.
346 340 Style/ParallelAssignment:
... ...
app/controllers/apps_controller.rb
... ... @@ -97,7 +97,7 @@ class AppsController < ApplicationController
97 97 if params[:app][:notification_service_attributes] && (notification_type = params[:app][:notification_service_attributes][:type])
98 98 available_notification_classes = [NotificationService] + NotificationService.subclasses
99 99 notification_class = available_notification_classes.detect{|c| c.name == notification_type}
100   - if !notification_class.nil?
  100 + if notification_class.present?
101 101 app.notification_service = notification_class.new(params[:app][:notification_service_attributes])
102 102 end
103 103 end
... ...