Have you tried eager loading the Movie
association using the :include
option?
Take a look at the API docs for #has_many
to see specific implementation and scroll to the top to the section called Eager loading of associations to see a general overview.