Upgrade to Pro — share decks privately, control downloads, hide ads and more …

【2018/09/18 Otemachi.rb#9】君(退会したユーザ)の名は。

Shu OGAWARA
September 18, 2018

【2018/09/18 Otemachi.rb#9】君(退会したユーザ)の名は。

2018/09/18のOtemachi.rb#9での発表資料です。久しぶりのRailsネタです。

Shu OGAWARA

September 18, 2018
Tweet

More Decks by Shu OGAWARA

Other Decks in Technology

Transcript

  1.  n & %(@expajp) –   ! – 3

    – Ruby/Rails(1 • Project Euler 100  •  Vue.js+  – # ' " – *$ )
  2. CM

  3.  n  post      

    n DB posts   ! user_id  NULL "  0   #  
  4.  n  post      

    n DB posts   ! user_id  NULL "  0   #  
  5.  n B83+,.02@A' " %  – ,.020 ;E(15*,47<: $#D=

     n View6-/)'C9 ? " %  &"  – View!6-/)'?   –  DRY>%
  6. N+1 Q . L S 0 N Q . 11

    N+1 / Eager Loading  - Rails Webook https://ruby-rails.hatenadiary.com/entry/20141108/1415418367 ’’
  7.  n Active Record/. creator_id0 - * n Decorator,#4( 

    *&!)$+   " → post'%*&!)30$+ → DRY21 
  8.  CH*-&0c$a2&16$ >TO@L&Kg\N MB/&K$ ;5&F Z$ [Ra2 VI% 43$QWU *-&P

    D$a2Gb# $  $ SY9X`d$=^!A]?(.+'),JE" $a2&<7:f_<$ The WyCash Portfolio Management System http://c2.com/doc/oopsla92.html heSY8TO - Wikipedia  ’’
  9.  n 06:?)<5DE n Decorator7*F2(>  +' -4@1%  –

    "#! .   n gem9(,38C  – B/) & ;A3 $/= 
  10.  n Decorator  Post creator   n User

    full_name  n Post NullUser, SystemUser –   full_name ! n creator  User, NullUser, SystemUser   
  11.  n  DB5-6  & %!* #($).  –

    View,1  '!  n 70+4 "*/ 32
  12.    n )$ " !'(   n

    View#*%&   
  13.    1.   2.   

     3. NullUser, SystemUser
  14.   n ;&B5$ – ?< 12$'*/+-@ – full_nameA03 %

    n ;D  …… – 89" FE –  DRY" n ;&,(-.4=6,). C :$# >7 !
  15.  n (#&')!% #@ n Rails0-=   – *"$!,E?28DRYF<251A

      – I74C>6 n +3D 9:HJ;B  – /.G+3D