author | Marcel Hlopko <marcel.hlopko@gmail.com> |
Tue, 25 Jun 2013 22:11:10 +0200 | |
changeset 106 | eac4098d544d |
parent 68 | ea16cf625333 |
child 108 | 69aa849f6930 |
permissions | -rw-r--r-- |
# == Schema Information # # Table name: benchmark_batches # # id :integer not null, primary key # performed_at :date # created_at :datetime # updated_at :datetime # class BenchmarkBatch < ActiveRecord::Base has_many :benchmark_results, inverse_of: :benchmark_batch belongs_to :benchmark_configuration, dependent: :destroy, inverse_of: :benchmark_batches validates_presence_of :performed_at def result_for(info) benchmark_results.where(benchmark_info: info).first end end