From 95671010eb9d03adbf7c6ce8a17fb59be06a3209 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Sun, 11 Dec 2016 17:29:48 -0500 Subject: [PATCH] ugly american notification pagination --- app/controllers/notifications_controller.rb | 2 +- app/views/notifications/index.html.erb | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/controllers/notifications_controller.rb b/app/controllers/notifications_controller.rb index 4759ef20..16049fc0 100644 --- a/app/controllers/notifications_controller.rb +++ b/app/controllers/notifications_controller.rb @@ -5,7 +5,7 @@ class NotificationsController < ApplicationController before_action :set_receipt, only: [:show, :mark_read, :mark_unread] def index - @notifications = current_user.mailbox.notifications + @notifications = current_user.mailbox.notifications.page(params[:page]).per(25) respond_to do |format| format.html diff --git a/app/views/notifications/index.html.erb b/app/views/notifications/index.html.erb index bd8022e5..8785dc91 100644 --- a/app/views/notifications/index.html.erb +++ b/app/views/notifications/index.html.erb @@ -30,6 +30,11 @@ <% end %> + + + <%= render partial: 'shared/back_to_mapping' %>