Showing the changes to lib/docs (1 of 4 files). Show all
Unified · Split
| @@ -20,15 +20,7 @@ module Docs · 19 unmodified lines | ||
| 20 | 20 | if doc.options[:attribution].is_a?(String) |
| 21 | 21 | json[:attribution] = doc.options[:attribution].strip |
| 22 | 22 | end |
| 23 | − | |
| 24 | − # parse doc aliases from JS file as Ruby hash | |
| 25 | − entry_file = File.open("assets/javascripts/models/entry.js") | |
| 26 | − data = entry_file.read | |
| 27 | − aliases = eval data.split("ALIASES = ").last.split(";").first | |
| 28 | − | |
| 29 | − # set alias value | |
| 30 | − json["alias"] = aliases[json["slug"].try(:to_sym)] | |
| 31 | − | |
| 23 | + json[:alias] = App.docs_aliases[json["slug"].try(:to_sym)] | |
| 32 | 24 | result << json |
| 33 | 25 | end |
| 34 | 26 | end |