From 5a367387cfec9c2a152c6aeba765ee5ba42e03af Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Tue, 14 Mar 2023 20:18:43 -0600 Subject: Añade paginación a controlador de Companies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/api/companies_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/api/companies_controller.rb b/app/controllers/api/companies_controller.rb index 21744de..fd72a8a 100644 --- a/app/controllers/api/companies_controller.rb +++ b/app/controllers/api/companies_controller.rb @@ -7,7 +7,7 @@ module Api skip_before_action :assert_master_role, only: %i[show index] def index - @companies = Company.all + @companies = Company.page(params[:page]) render json: serialized_collection.serializable_hash, status: 200 end -- cgit v1.2.3