accept anycase adapter names

pull/6827/head
Philipp Tessenow 14 years ago
parent 8c8f5c6b7a
commit dae8c70496
  1. 2
      app/models/cost_query/query_utils.rb

@ -127,7 +127,7 @@ module CostQuery::QueryUtils
def iso_year_week(field, default_table = nil)
field = field_name_for(field, default_table)
"-- code specific for #{adapter_name}\n\t" << \
case adapter_name
case adapter_name.to_s.downcase.to_sym
when :mysql, :mysql2
"yearweek(#{field}, 1)"
when :postgresql

Loading…
Cancel
Save