simplified some Active Record queries

This commit is contained in:
Hauke Klement
2015-03-11 14:31:19 +01:00
parent a06e20b6c5
commit a8bda864df
6 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@ class Whistleblower
PLACEHOLDER_REGEXP = /\$(\d)/
def find_hint(stderr)
Hint.where(execution_environment_id: @execution_environment.id).detect do |hint|
@execution_environment.hints.detect do |hint|
@matches = Regexp.new(hint.regular_expression).match(stderr)
end
end