performance tweaks for rails 4.1
This commit is contained in:
@@ -22,7 +22,9 @@ class PoolElementsController < ApplicationController
|
||||
end
|
||||
|
||||
def all_select
|
||||
@pools = Pool.undeleted.where("is_active = true").order("name").select("id, name").all
|
||||
@pools = Pool.undeleted.where("is_active = true").order("name").select("id, name")
|
||||
@pools.each # hack to force rails to eager load
|
||||
@pools
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user