summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMrYummy <elemental428@gmail.com>2017-06-16 21:16:35 +0200
committerMrYummy <elemental428@gmail.com>2017-06-16 21:16:35 +0200
commitf60edea1beab3daf7c58f9d463d6fcdfb633061e (patch)
tree243a350b566d0ba5cbe4eafe61a6d0b0dc96a9e2
parent2bb75bb0b6ab4a54d98005754f614d0c101b11f8 (diff)
Fixed 'No private messages' bug
-rw-r--r--app/views/messages/index.html.erb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/messages/index.html.erb b/app/views/messages/index.html.erb
index 0ce7008..82f6154 100644
--- a/app/views/messages/index.html.erb
+++ b/app/views/messages/index.html.erb
@@ -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.