Skip to content

Instantly share code, notes, and snippets.

@isopen
Created December 12, 2019 21:50
Show Gist options
  • Save isopen/ece2ea658f42b4bda9ce5bad228cc224 to your computer and use it in GitHub Desktop.
Save isopen/ece2ea658f42b4bda9ce5bad228cc224 to your computer and use it in GitHub Desktop.
hot)fix
...
lang.each do |section|
articles = Utils.get_articles(json, section)
next unless articles
...
end
...
...
def self.get_articles(data, section)
r = data.find do |h|
h['lang_code'] == section
end
r.nil? ? false : r['articles']
end
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment