--- a/web/app/models/compare_query.rb Thu Aug 29 17:00:56 2013 +0200
+++ b/web/app/models/compare_query.rb Sun Sep 08 12:40:37 2013 +0200
@@ -1,24 +1,20 @@
class CompareQuery
include ActiveModel::Model
- attr_accessor :benchmark_id, :benchmark_configurations
+ attr_accessor :benchmark_infos
def initialize(*args)
super
- @benchmark_configurations ||= {}
+ @benchmark_infos ||= {}
end
- def filtered_benchmark_configurations
- BenchmarkConfiguration.where(id: benchmark_configurations_to_array_of_ids)
- end
-
- def benchmark_info
- BenchmarkInfo.find(benchmark_id)
+ def filtered_benchmark_infos
+ BenchmarkInfo.where(id: benchmark_infos_to_array_of_ids)
end
private
- def benchmark_configurations_to_array_of_ids
- benchmark_configurations.keys
+ def benchmark_infos_to_array_of_ids
+ benchmark_infos.keys
end
end