ugly american notification pagination
This commit is contained in:
parent
95860dfc55
commit
95671010eb
2 changed files with 6 additions and 1 deletions
|
@ -5,7 +5,7 @@ class NotificationsController < ApplicationController
|
||||||
before_action :set_receipt, only: [:show, :mark_read, :mark_unread]
|
before_action :set_receipt, only: [:show, :mark_read, :mark_unread]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@notifications = current_user.mailbox.notifications
|
@notifications = current_user.mailbox.notifications.page(params[:page]).per(25)
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
|
|
|
@ -30,6 +30,11 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="centerContent pagination">
|
||||||
|
<%= paginate @notifications %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%= render partial: 'shared/back_to_mapping' %>
|
<%= render partial: 'shared/back_to_mapping' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue