190530 TIL Ruby on Rails - layout
    
    May 30, 2019
    
    
    
      » 
      1막,
      
      TIL (Today I Learned)
    
    
  
  Ruby on Rails - ch4. Rails-flavored Ruby
- Ruby 문법을 배웠다.
    - nil=== nothing at all === returns nothing
- !!=== 반대를 반대로? / bang bang이라고 읽는다고.. 뱅뱅~
- index의 복수형이 indices인건 처음 알았네 (갑분 영어공부)
- (0..10).to_a->- [0,1,,,10]배열 완성!! (문자열도 됨)
- %w [foo bar baz]하면 다 문자열 변환됨!!
- superclass는 js- prototype이랑 비슷한 개념인듯. Ruby도 Object로 이루어져있다고 함. (결국 타고 올라가면 다 객체인 것이여!!)
- 
        #{}가 interpolation이라고 하는데, 문자열로 변환해 주는 거 같기도 하고, 템플레이팅 같기도 하다.stackoverflow It’s the string interpolation operator, you use it to insert an expression into a string. Your string needs to be embedded in “ to let this magic work, no ‘s. It is much faster and better than string concatenation. var = "variable" "this is a string with a #{var} in" => "this is a string with a variable in"It is worth noting that it also works inside %Q{…} strings, heredoc strings, %W{…} arrays, backtick commands, %x{…} commands and Regexp literals. 
- 
        puts=== put stringstackoverflow puts adds a new line to the end of each argument if there is not one already. 
 puts [[1,2,3], [4,5,nil]]Would return:1 2 3 4 5
 
Ruby on Rails - ch5. Filling in the layout
- 드디어 레이아웃 잡는 걸 연습했다.
- 뭔가 하란대로 슝슝 했는데, 너무 쉽게 뚝딱되서 신기…
- bootstrap과 sass 사용.
- heroku 페이지
완벽한 이해보다는 어제보다 오늘 하나 더 배우고 익혔다는 생각으로 차근차근 수련하다보면 어느 순간 그림이 그려지는 날이 올거예요.
