Created
December 12, 2019 21:50
-
-
Save isopen/ece2ea658f42b4bda9ce5bad228cc224 to your computer and use it in GitHub Desktop.
hot)fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| lang.each do |section| | |
| articles = Utils.get_articles(json, section) | |
| next unless articles | |
| ... | |
| end | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| 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