lib/field_test/experiment.rb in field_test-0.6.1 vs lib/field_test/experiment.rb in field_test-0.7.0
- old
+ new
@@ -110,16 +110,16 @@
if use_events? && @goals_defined
data = {}
participated = relation.count
- adapter_name = relation.connection.adapter_name
+ adapter_name = relation.connection_db_config.adapter.to_s
column =
if FieldTest.legacy_participants
:participant
elsif adapter_name.match?(/postg/i) # postgres
"(participant_type, participant_id)"
- elsif adapter_name.match?(/mysql/i)
+ elsif adapter_name.match?(/mysql|trilogy/i)
"COALESCE(participant_type, ''), participant_id"
else
# SQLite supports single column
"COALESCE(participant_type, '') || ':' || participant_id"
end