gauge/app/controllers/home_controller.rb
Petko Bordjukov b9ad36fa6b Optimize talk preferences export
Eager load all associated selected talks
2016-10-07 00:41:10 +03:00

15 lines
300 B
Ruby

class HomeController < ApplicationController
def index
end
def ratings
@talks = Talk.ordered_by_rating
@ratings = Ratings.new
@votes_count = TalkPreference.this_years.count
end
def export
@talk_preferences = TalkPreference.this_years.eager_load(:selected_talks)
end
end