My Requirement is to send the count size of the database with active record association
I am trying to limit the size of record and want to load more options and clicking on load more will give all records
records = company.public_send(table).joins(:customer).where(customer_id: ids).order(sorting)
#records = records.count(:id) #300
records = records.limit(5)
This return me active record, along with this i want to send entire size of record How can i do it
Aucun commentaire:
Enregistrer un commentaire