🚨 Pay Just $95/Year (Save 50%)—Black Friday Deal!

Este episodio es solo para suscriptores.

Al suscribirte, tendrás acceso a todos los videos y al código fuente. También me apoyas para crear más contenido.

Use JSON to store and display company information | SupeRails #189

01/09/2024
Pro

Bravo, you made it to the final episode in the series, dear friend!

To store the whole company information and make it searchable and readable, we should use JSON, not a TEXT field.

The easiest way to store all the company data in a JSON will be to make an additional call to the company registry API after the company is created, and store the response in the JSON column in our database.

By the way, if you use Postgresq, I recommend JSONB (it has better performance). Otherwise use JSON.

Episode source code: [member-only link]