web/app/models/compare_query.rb
author Marcel Hlopko <marcel.hlopko@gmail.com>
Sun, 08 Sep 2013 12:40:37 +0200
changeset 179 620d2ceb6ddc
parent 111 28dccacb2bc1
child 236 2565b32e93b3
permissions -rw-r--r--
change compare table to always show all configurations

class CompareQuery
  include ActiveModel::Model

  attr_accessor :benchmark_infos

  def initialize(*args)
    super
    @benchmark_infos ||= {}
  end

  def filtered_benchmark_infos
    BenchmarkInfo.where(id: benchmark_infos_to_array_of_ids)
  end

  private

  def benchmark_infos_to_array_of_ids
    benchmark_infos.keys
  end
end