Fork me on GitHub!
Señor Developer!


Ruby User Group Berlin

Efficient SQL preloading for your serializers

this Topic will be presented by Jan Berdajs

at June Meetup 2015, hosted by Tobias Pfeiffer

Note: I am only in Berlin until the end of June unfortunately.

When working on a bigger API Rails project, you might encounter situations where loading data to return from the API is not as trivial as simply loading a model with ActiveRecord and specifying a few includes. Even a simple case of efficiently loading only the first Photo for all Products, for example, is not trivial to implement with ActiveRecord. We will discuss a few tricks we can use in ActiveRecord itself for doing this kind of things, and then we will look at a gem which provides a nice DSL for specifying how to preload data in more complex cases.

1 People like it