Rendering JSON is pretty easy in Rails: 1 render json: @statuses This works well if there are small number of records to be returned. But what happens when we need to return 10,000 records at once? Things slow down dramatically and the most time-consuming parts are JSON serialization and database operations. Include only required attributes The first obvious thing is generating JSON with only attr