Small notification update (#1169)
* Small notification update * Rescue errors in notifications
This commit is contained in:
parent
1e2749be24
commit
86c60307d2
3 changed files with 4 additions and 2 deletions
|
|
@ -80,7 +80,7 @@
|
|||
border: 0px;
|
||||
display:inline-block;
|
||||
width: 27%;
|
||||
padding: 6px 0px;
|
||||
padding: 9px 0px;
|
||||
text-align:left;
|
||||
border-radius: 100px;
|
||||
color: $black;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class NotificationsController < ApplicationController
|
|||
order("notified_at DESC").limit(55).to_a)
|
||||
elsif params[:filter].to_s.downcase == "comments"
|
||||
@notifications = NotificationDecorator.
|
||||
decorate_collection(Notification.where(user_id: current_user.id, notifiable_type: "Comment").
|
||||
decorate_collection(Notification.where(user_id: current_user.id, notifiable_type: "Comment", action: nil). # Nil action means not reaction in this context
|
||||
order("notified_at DESC").limit(55).to_a)
|
||||
else
|
||||
@notifications = NotificationDecorator.
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@
|
|||
<div class="single-article single-article-small-pic <%= "unseen" unless notification.read? %>">
|
||||
<%= render "#{notification.notifiable_type.downcase}", notification: notification %>
|
||||
</div>
|
||||
<% rescue => e %>
|
||||
<% logger.error("Notifification error - #{e.message} - #{notification.id}") %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="content notification-content comment-content">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue