lib/field_test/experiment.rb in field_test-0.6.0 vs lib/field_test/experiment.rb in field_test-0.6.1
- old
+ new
@@ -114,12 +114,12 @@
adapter_name = relation.connection.adapter_name
column =
if FieldTest.legacy_participants
:participant
- elsif adapter_name =~ /postg/i # postgres
+ elsif adapter_name.match?(/postg/i) # postgres
"(participant_type, participant_id)"
- elsif adapter_name =~ /mysql/i
+ elsif adapter_name.match?(/mysql/i)
"COALESCE(participant_type, ''), participant_id"
else
# SQLite supports single column
"COALESCE(participant_type, '') || ':' || participant_id"
end