author | Marcel Hlopko <marcel@hlopko.com> |
Tue, 17 Nov 2015 15:05:38 +0100 | |
changeset 306 | 8050d8d3681f |
parent 241 | 6c56f95bddd3 |
permissions | -rw-r--r-- |
class CompareQuery include ActiveModel::Model attr_accessor :benchmark_infos def initialize(*args) super @benchmark_infos ||= {} end def filtered_benchmark_infos BenchmarkInfo .where(id: filtered_benchmark_info_ids) .includes(benchmark_results: [ :benchmark_batch, :benchmark_durations, :benchmark_parameters ]) end def filtered_benchmark_info_ids benchmark_infos.select(&:present?).compact end end