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

Popular posts from this blog

Java 8 + Maven Javadoc plugin: Error fetching URL -

android - How to delete or change the searchview icon inside the SearchView actionBar? -

c++ - Msgpack packing bools bug -