summaryrefslogtreecommitdiff
path: root/app/controllers/api
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-03-14 20:18:43 -0600
committerHombreLaser <sebastian-440@live.com>2023-03-14 20:18:43 -0600
commit5a367387cfec9c2a152c6aeba765ee5ba42e03af (patch)
tree7aabde882492a4fd5cf16ac665af3e3738daa6cf /app/controllers/api
parent26b40a7a38ced56998a4316ac0d21374c6080d6b (diff)
Añade paginación a controlador de Companies
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/companies_controller.rb2
1 files changed, 1 insertions, 1 deletions
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