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
| rails active_storage:install | |
| rake db:migrate | |
| ||in the model|| | |
| has_one_attached :avatar <- can call it anything (e.g. image) | |
| json.array! @profiles.each do |profile| | |
| json.name profile.name |
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
| Capstone Requirements (planning) | |
| Trello Board with: | |
| 1. MVP | |
| 2. Tier 2 | |
| 3. Tier 3 | |
| 4. Done | |
| 5. Waiting | |
| 6. Icebox |
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
| scope :quick, -> { where("prep_time < ?", 40) } | |
| A lambda ( -> ) is a block of code that... | |
| ^ lambda | |
| block_of_code = -> (num) {5 * number} | |
| block_of_code.call |
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
| heroku logs --tail <- will show Netlify errors in terminal | |
| git push heroku master <- pushes changes to heroku | |
| Monolith vs Microservices | |
| Monolith is one big app. Microservices are an individual app. |
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
| tasks.each(&:snooze_hour!) | |
| ^ same as ^ | |
| tasks.each do |task| | |
| task.snooze_hour! | |
| end | |
| words = ['ace', 'butter', 'cats'] | |
| loud_words = word.map(&:upcase) -> loud_words is a new array of ['ACE', 'BUTTER', 'CATS'] |
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
| Test Driven Development (TDD) | |
| 1. Write a test that fails | |
| 2. Make the code work | |
| 3. Eliminate redundancy (refactor) | |
| Test again (fails, process repeating) | |
| • Ensures that your test is written correctly | |
| • Ensure that you actually write tests for all your code | |
| • Leads to better design (debatable) |
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
| Automated Testing (also known as regression testing) | |
| Testing usually has a note that explains what the code does. Can improve the code written. Leads into TDD - Test Driven Development. | |
| Can incorporate Rspec (stands for Ruby specs - we will use this). Doesn't come standard with rails. | |
| <|terminal> | |
| mkdir rspec_exercises | |
| <calculator.rb> |
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
| dom - document object model | |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head onmousemove="doAnotherThing()"> | |
| <meta charset="UTF-8"> | |
| <title>Hamilton</title> | |
| </head> | |
| <body onmousemove="doAnotherThing()"> | |
| <h1 onmouseover="doTheThing()">Alexander Hamilton</h1> |
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
| <|terminal/cookbook_vue_app|> | |
| npm install vue2-filters --save | |
| <|RecipesIndex.vue|> | |
| <script> | |
| import Vue2Filters from 'vue2-filters'; | |
| var axios = require('axios'); | |
| data: function() { | |
| return { |
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
| "If you see the word render as an error, it means something is wrong with the template." |
NewerOlder