From a145abff56c42ca91ac84576e0af90508f1f5fdf Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Thu, 31 Aug 2017 21:27:22 +1200 Subject: [PATCH] Changed regex to matches? to appease rubocop --- app/controllers/notifications_controller.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/controllers/notifications_controller.rb b/app/controllers/notifications_controller.rb index ae0a3e3e7..7a2eae9a4 100644 --- a/app/controllers/notifications_controller.rb +++ b/app/controllers/notifications_controller.rb @@ -31,9 +31,11 @@ class NotificationsController < ApplicationController @sender_notification.read = true @sender_notification.save @recipient = @sender_notification.sender - @subject = @sender_notification.subject =~ /^Re: / ? - @sender_notification.subject : - "Re: " + @sender_notification.subject + @subject = if @sender_notification.subject.matches?(/^Re: /) + @sender_notification.subject + else + "Re: " + @sender_notification.subject + end end # DELETE /notifications/1