wasn't using the proper serializer causing frontend error

This commit is contained in:
Connor Turland 2017-09-29 13:06:19 -04:00
parent 216a19476b
commit 8695297a0f

View file

@ -6,7 +6,6 @@ class NotificationsController < ApplicationController
def index
@notifications = current_user.mailbox.notifications.page(params[:page]).per(25)
respond_to do |format|
format.html
format.json do
@ -14,7 +13,11 @@ class NotificationsController < ApplicationController
receipt = @receipts.find_by(notification_id: notification.id)
NotificationDecorator.decorate(notification, receipt)
end
if notifications.length > 0
render json: notifications
else
render json: [].to_json
end
end
end
end