| Matches - warvox - VoIP based wardialing tool, forked from rapid7/warvox. | |
| Log | |
| Files | |
| Refs | |
| README | |
| --- | |
| commit edfaf614409017aa10ff9507ca8c4498a5827879 | |
| parent 9dddb5e0d690140543cb3b3f2cde9afbb94bef55 | |
| Author: HD Moore <[email protected]> | |
| Date: Thu, 4 Aug 2011 18:49:06 +0000 | |
| Matches | |
| Diffstat: | |
| M web/app/models/dial_result.rb | 17 +++++++++++++++++ | |
| 1 file changed, 17 insertions(+), 0 deletions(-) | |
| --- | |
| diff --git a/web/app/models/dial_result.rb b/web/app/models/dial_result.rb | |
| @@ -1,4 +1,21 @@ | |
| class DialResult < ActiveRecord::Base | |
| belongs_to :provider | |
| belongs_to :dial_job | |
| + | |
| + | |
| + has_many :matches, :class_name => 'DialResult', :finder_sql => | |
| + 'SELECT dial_results.*, ' + | |
| + ' (( icount(\'#{fprint}\'::int[] & dial_results.fprint:… | |
| + 'FROM dial_results ' + | |
| + 'WHERE icount(dial_results.fprint) > 0 AND ' + | |
| + 'dial_results.dial_job_id = \'#{dial_job_id}\' ' + | |
| + 'ORDER BY matchscore DESC' | |
| + | |
| + has_many :matches_all_jobs, :class_name => 'DialResult', :finder_sql => | |
| + 'SELECT dial_results.*, ' + | |
| + ' (( icount(\'#{fprint}\'::int[] & dial_results.fprint:… | |
| + 'FROM dial_results ' + | |
| + 'WHERE icount(dial_results.fprint) > 0 ' + | |
| + 'ORDER BY matchscore DESC' | |
| + | |
| end |