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

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -