% label_name = profile.person? ? _('Open chat') : _('Join chat room') %> <% display = profile.person? ? profile.friends.include?(user) : profile.members.include?(user) %> <% if display %>