use eager loading to reduce the number of database queries

This commit is contained in:
Hauke Klement
2015-03-11 14:24:24 +01:00
parent 67c7e1427e
commit a06e20b6c5
7 changed files with 7 additions and 7 deletions

View File

@ -34,7 +34,7 @@ class ExecutionEnvironmentsController < ApplicationController
private :execution_environment_params
def index
@execution_environments = ExecutionEnvironment.all.order(:name)
@execution_environments = ExecutionEnvironment.all.includes(:user).order(:name)
authorize!
end