Guest User

Untitled

a guest
Feb 18th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. for removing from model to do multiple columns in terminal use AND
  2.  
  3.  
  4.  
  5.  
  6. Order of key when creating a model wont matter
  7. For example
  8. :status, default: "carted" , (it means that is will be added to cart after product is carted)
  9.  
  10. In order to remove a change to existing model
  11.  
  12.  
  13. short hasn
  14. Order.destroy_all will do all methods
  15.  
  16. if no order id after it requested it will rollback, to navigate through this
  17. ex. belongs_to order: , optional: true
  18.  
  19.  
  20. When creating a controller, alway add change to routes, before addign aything to controller
  21.  
  22.  
  23.  
  24. if defuault example carrted add status and default on carted, that will no be necessary in controller. other wise it wiill be
  25.  
  26. where: is a collention mehtod
  27.  
  28.  
  29.  
  30. Big O Continued
  31.  
  32.  
  33. Let's create
  34.  
  35. nested loop loop within a loop
  36.  
  37. n square number mutiplied nsteps times nsteps
  38.  
  39.  
  40.  
  41. o(N)
  42. o(log N)
  43. o(N2)
  44.  
  45. Stay away form N2
Add Comment
Please, Sign In to add comment