more silly bug fixes, i need to learn how to use branches for this :-/
| 20 | 21 | |
|---|---|---|
| 61 | 61 | def self.build_sql_conditional_for(options={}) |
| 62 | 62 | conditions = [] |
| 63 | 63 | options.each do |key, value| |
| 64 | conditional = decide_conditional(option) | |
| 65 | conditions << self.send(:sanitize_sql, ["#{option.key.to_s}_id #{conditional} ?", option.value]) | |
| 64 | conditional = decide_conditional(value) | |
| 65 | conditions << self.send(:sanitize_sql, ["#{key.to_s}_id #{conditional} ?", value]) | |
| 66 | 66 | end |
| 67 | 67 | return conditions |
| 68 | 68 | end |
