From 1b30508c19f5bf793dc759e3f1c79c764d601980 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sun, 27 Aug 2017 18:19:43 +0200 Subject: [PATCH] Fix ConversationsHelper#conversation_class with frozen strings --- app/helpers/conversations_helper.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/helpers/conversations_helper.rb b/app/helpers/conversations_helper.rb index f02492bc9..beac7dc4f 100644 --- a/app/helpers/conversations_helper.rb +++ b/app/helpers/conversations_helper.rb @@ -2,10 +2,9 @@ module ConversationsHelper def conversation_class(conversation, unread_count, selected_conversation_id) - conv_class = unread_count > 0 ? "unread " : "" - if selected_conversation_id && conversation.id == selected_conversation_id - conv_class << "selected" - end - conv_class + conv_class = unread_count > 0 ? "unread" : "" + return conv_class unless selected_conversation_id && conversation.id == selected_conversation_id + + "#{conv_class} selected" end end