diff options
author | HombreLaser <sebastian-440@live.com> | 2023-03-14 20:18:43 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-03-14 20:18:43 -0600 |
commit | 5a367387cfec9c2a152c6aeba765ee5ba42e03af (patch) | |
tree | 7aabde882492a4fd5cf16ac665af3e3738daa6cf /app/controllers/api/companies_controller.rb | |
parent | 26b40a7a38ced56998a4316ac0d21374c6080d6b (diff) |
Añade paginación a controlador de Companies
Diffstat (limited to 'app/controllers/api/companies_controller.rb')
-rw-r--r-- | app/controllers/api/companies_controller.rb | 2 |
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 |