You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to only change the name of a country without losing its other data.
I think I've found the proper way like this: ISO3166::Data.register(ISO3166::Country.new('KP').tap { |c| c.data[:name] = 'North Korea' }.data.symbolize_keys)
It seems to work, I think the only change is the pre-loading of all translations like warned in the Readme ("Loading Custom Data" section).
So here this is not really an issue I'm opening, I'm just asking if this is the proper/best way do to this? If so, maybe it could be described in the "Loading Custom Data" section of the Readme, as it took me a moment to find this solution.
If you find useful to include this in the readme, just pay attention that symbolize_keys is a Rails method.
Kind regards
The text was updated successfully, but these errors were encountered:
I think this is a completely valid solution. We do not have an API to just merge the data together currently, but I would be more than happy to accept a PR on one.
Hello and first thank you for this awesome gem.
I'm trying to only change the name of a country without losing its other data.
I think I've found the proper way like this:
ISO3166::Data.register(ISO3166::Country.new('KP').tap { |c| c.data[:name] = 'North Korea' }.data.symbolize_keys)
It seems to work, I think the only change is the pre-loading of all translations like warned in the Readme ("Loading Custom Data" section).
So here this is not really an issue I'm opening, I'm just asking if this is the proper/best way do to this? If so, maybe it could be described in the "Loading Custom Data" section of the Readme, as it took me a moment to find this solution.
If you find useful to include this in the readme, just pay attention that
symbolize_keys
is a Rails method.Kind regards
The text was updated successfully, but these errors were encountered: