Optimize talk preferences export

Eager load all associated selected talks
This commit is contained in:
Petko Bordjukov 2016-10-07 00:41:10 +03:00
parent 11140e9bec
commit b9ad36fa6b
1 changed files with 1 additions and 1 deletions

View File

@ -9,6 +9,6 @@ class HomeController < ApplicationController
end
def export
@talk_preferences = TalkPreference.this_years
@talk_preferences = TalkPreference.this_years.eager_load(:selected_talks)
end
end