Open kinman-enphase opened 9 years ago
The problem appears to be in Carmen::Region#flatten_data:
flattened.each do |hash|
flattened.delete(hash) if hash['_enabled'] == false
end
It would be better to create a new collection rather than to mutate the one being iterated over:
Ruby console
> enabled_regions = flattened.select {|r| r['_enabled']}
[]
For several countries, I'd like to suppress all subregions. I set the _enabled attribute to false on all subregions, but only every other one is actually suppressed. For example:
bd.yml
Rails console:
Is there better way to suppress all subregions?