fixed oversight, added paging to connections

This commit is contained in:
Zanz2 2018-09-11 13:06:41 +02:00
parent c5300865d6
commit fa54badb9a

View file

@ -10,6 +10,8 @@ module Api
before_action :load_connection, only: :show
def index
@connections = @connections.page(params.dig(:page, :number))
.per(params.dig(:page, :size))
render jsonapi: @connections, each_serializer: ConnectionSerializer
end