Method: FactMetrics::CountConfig#condition_sql
- Defined in:
- lib/fact_metrics/count_config.rb
#condition_sql ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/fact_metrics/count_config.rb', line 29 def condition_sql if [:all] == true [:all].to_s elsif [:equal].present? "#{[:field] || name} = '#{[:equal]}'" elsif [:condition].present? [:condition].to_s end end |