Skip to content

Commit b2362cd

Browse files
committed
Fix errors
1 parent 84e5ef1 commit b2362cd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/optimizely/cmab/cmab_client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def fetch_decision(rule_id, user_id, attributes, cmab_uuid, timeout: MAX_WAIT_TI
6262
# Returns:
6363
# The variation ID.
6464
url = "https://prediction.cmab.optimizely.com/predict/#{rule_id}"
65-
cmab_attributes = attributes.map { |key, value| {id: key, value: value, type: 'custom_attribute'} }
65+
cmab_attributes = attributes.map { |key, value| {id: key.to_s, value: value, type: 'custom_attribute'} }
6666

6767
request_body = {
6868
instances: [{

spec/cmab_client_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
visitorId: user_id,
3535
experimentId: rule_id,
3636
attributes: [
37-
{id: 'attr1', value: 'value1', type: 'custom_attribute'},
38-
{id: 'attr2', value: 'value2', type: 'custom_attribute'}
37+
{'id' => 'attr1', 'value' => 'value1', 'type' => 'custom_attribute'},
38+
{'id' => 'attr2', 'value' => 'value2', 'type' => 'custom_attribute'}
3939
],
4040
cmabUUID: cmab_uuid
4141
}]

0 commit comments

Comments
 (0)