Paginate action Settings::SessionsController#index
This commit is contained in:
parent
451370df8a
commit
48fa4eb81e
2 changed files with 3 additions and 1 deletions
|
@ -7,6 +7,7 @@ class Settings::SessionsController < ApplicationController
|
|||
def index
|
||||
authorize [:settings, Session]
|
||||
|
||||
@sessions = current_account.sessions.order(logged_at: :desc).limit(10)
|
||||
@sessions = current_account.sessions.order(logged_at: :desc)
|
||||
.page(params[:page])
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
<div class="col-md-9">
|
||||
<%= render partial: 'table', locals: { sessions: @sessions } %>
|
||||
<%= paginate @sessions %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Reference in a new issue