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
| pre code.hljs { | |
| display: block; | |
| overflow-x: auto; | |
| padding: 1em | |
| } | |
| code.hljs { | |
| padding: 3px 5px | |
| } |
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
| #!/usr/bin/env ruby | |
| require 'benchmark' | |
| REGEXPS = [ | |
| /^no such file to load -- (.+)$/i, | |
| /^Missing \w+ (?:file\s*)?([^\s]+.rb)$/i, | |
| /^Missing API definition file in (.+)$/i, | |
| /^cannot load such file -- (.+)$/i, | |
| ] |
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
| Each new Recipe created can be linked to a restaurant through the restaurant field. The restaurant field currently stores the restaurant name as a string. The name is entered as free text into a text box by the nutrition team on the recipes#new page. | |
| Really we should give a dropdown list of restaurants to select. The available restaurants can be pulled from the backend using the nutrition_app_api e.g. | |
| curl devapi.zesty.com/nutrition_app_api/restaurants -H 'X-HASTY-API-KEY: nutrition-app-exercise' | |
| {"restaurants":[{"id":"50a123f8d8c6229f09000001","name":"Darn Good Food"},{"id":"5144fcf8eefbfe8e83000001","name":"Beautifull"},{"id":"5153034beefbfea8b4000001","name":"Wonderland"},{"id":"51788281eefbfef816000001","name":"Thai Noodle Bar \u0026 Grill"},{"id":"518d34c3eefbfe9b3e000001","name":"Jasmine Tea House"},{"id":"519126d3eefbfea989000001","name":"Mehfil Indian Cuisine \u0026 Bar"},{"id":"5191e64deefbfed8e9000001","name":"Bamboo Asia"},{"id":"51ad43c7eefbfe6ae5000001","name":"Baby Blues BBQ"},{"id":"51ae5717 |
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
| http://bparanj.blogspot.com/2014/06/why-using-interactor-gem-is-very-bad.html | |
| https://news.ycombinator.com/item?id=7335211 |