moved the operator point so it doesn't add an OR search
| 26 | 27 | |
|---|---|---|
| 51 | 51 | private |
| 52 | 52 | def self.build_sql_conditional_for(options={}) |
| 53 | 53 | conditions = [] |
| 54 | operator = options.delete(:operator) | |
| 54 | 55 | options.each do |key, value| |
| 55 | 56 | conditions << self.send(:sanitize_sql, ["#{key.to_s}_id IN (?)", value]) |
| 56 | 57 | end |
| 57 | operator = options.delete(:operator) | |
| 58 | 58 | return conditions.join(" #{operator || "AND"} ") |
| 59 | 59 | end |
| 60 | 60 | |
