Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
Return to deep_transform_keys so that site_key is camelized
Browse files Browse the repository at this point in the history
  • Loading branch information
osahyoun committed Nov 13, 2019
1 parent 39957ac commit 7596d46
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/helpers/config_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ def global_config
default_currency: Settings.default_currency,
facebook: Settings.facebook.to_hash.slice(:pixel_id),
recaptcha3: Settings.recaptcha3.to_hash.slice(:site_key),
recaptcha2: Settings.recaptcha2.to_hash.slice(:site_key),
eoy_thermometer: eoy_thermometer_config
}.transform_keys! do |key|
recaptcha2: Settings.recaptcha2.to_hash.slice(:site_key)
}.deep_transform_keys! do |key|
key.to_s.camelize(:lower)
end
end.merge(
eoyThermometer: eoy_thermometer_config

This comment has been minimized.

Copy link
@Tuuleh

Tuuleh Nov 14, 2019

Contributor

Was this what made it break? Isn't the site_key just a string, so it shouldn't matter whether you deep transform keys or just transform the top level keys? This is what we speculated with Vince at least. On my eoy branch, recaptcha works fine with transform_keys! called instead of deep_transform_keys - so are you sure this is what breaks it?

This comment has been minimized.

Copy link
@osahyoun

osahyoun via email Nov 14, 2019

Author Member

This comment has been minimized.

Copy link
@vincemtnz

vincemtnz Nov 14, 2019

Contributor

Yeah we were wrong about it being a string! 🙊

This comment has been minimized.

Copy link
@Tuuleh

Tuuleh Nov 14, 2019

Contributor

It is suuuper weird that it didn't break for me, and still doesn't. But if this fixes it on staging, it's good to go and I'm happy that we caught it before it went live!

)
end

def eoy_thermometer_config
Expand Down

0 comments on commit 7596d46

Please sign in to comment.