Rails 4: Eager load entire table -
in rails app, have categories table has around 10 rows. there association whereby post belongs category. rather eager loading categories every single post query, since it's small table there way eager load whole table once when application starts , thereby avoid additional queries when calling post.category association method?
i think can achieve similar effect using global variable nice able use standard 'category' association.
Comments
Post a Comment