Skip to content

Instantly share code, notes, and snippets.

@danielnmai
Last active June 11, 2017 21:52
Show Gist options
  • Save danielnmai/349c5cb93c6d26a8155bed076f9eb839 to your computer and use it in GitHub Desktop.
Save danielnmai/349c5cb93c6d26a8155bed076f9eb839 to your computer and use it in GitHub Desktop.
Today I Learned - Week 6

JSON: JavaScript Object Notation

---------6/5/2017------------------ jbuilder is built by default by Rails show.jbuilder.json => build a JSON show page json.array! @employees.each do |employee|

end

Aside from jbuilder, we can also use responder, RABL, active_model_serializer Internal API: It can be faster It can help others find our API It aids with dynamic content ---------6/6/2017------------------ namespace to have version control do in terminal: rails g controller api/v1/ModelName (more garbage files) ---------6/7/2017------------------ ALWAYS make sure to have the models (database and relationships) to work first, before creating controllers. ---------6/8/2017------------------ PORO : Plain Old Ruby Object dotenv: it is a gem to hold all API URIs and DRY up our codes ---------6/11/2017------------------ When asked about your weaknesses, mention a weakness and ALWAYS provide a way to work on get over your weakness. (a solution to your problem).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment