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