Fixed 'No private messages' bug

This commit is contained in:
MrYummy
2017-06-16 21:16:35 +02:00
parent 2bb75bb0b6
commit f60edea1be

View File

@@ -4,7 +4,7 @@
<%= link_to "Create new message", new_message_path, class: "btn blue right" %>
<br>
<h2>
<% if Message.where(user_target_id: current_user.id).any? %>
<% if Message.where("user_target_id = ? OR user_sender_id = ?", current_user.id, current_user.id).any? %>
Your private messages:
<% else %>
You have no private messages.