Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
【2018/09/18 Otemachi.rb#9】君(退会したユーザ)の名は。
Search
Shu OGAWARA
September 18, 2018
Technology
0
530
【2018/09/18 Otemachi.rb#9】君(退会したユーザ)の名は。
2018/09/18のOtemachi.rb#9での発表資料です。久しぶりのRailsネタです。
Shu OGAWARA
September 18, 2018
Tweet
Share
More Decks by Shu OGAWARA
See All by Shu OGAWARA
あなたの知らないDateのひみつ / The Secret of "Date" You Haven't known #tqrk16
expajp
0
130
入門 FormObject / An Introduction to FormObject #kaigionrails
expajp
2
5.2k
あなたの「仮説検証」、ゆがんでいませんか? / Isn't Your "Hypothesis Verification" Distorted? #emoasis
expajp
2
440
Rubyはなぜ「たのしい」のか? / Why is Ruby a programmers' best friend? #tqrk15
expajp
5
2.1k
エンジニアリングマネージャーはどう学んでいくのか #devsumi / How Do Engineering Managers Continue to Learn and Grow?
expajp
8
5.6k
RubyKaigi参加歴をふりかえる / Looking Back on My RubyKaigi Participation History #kaigieffectLT
expajp
3
540
わたしのメタ学習 / My Own Meta Learning #shinjukurb
expajp
0
490
ActiveSupport::Concernで開くメタプログラミングの扉 #heiseirubykaigi / The door of meta-programing is opened by ActiveSupport::Concern
expajp
1
2.4k
実践Railsアプリケーション設計 #meetup_rails / Practical Rails Application Design
expajp
4
40k
Other Decks in Technology
See All in Technology
[PR] はじめてのデジタルアイデンティティという本を書きました
ritou
1
790
人工知能のための哲学塾 ニューロフィロソフィ篇 第零夜 「ニューロフィロソフィとは何か?」
miyayou
0
400
「駆動」って言葉、なんかカッコイイ_Mitz
comucal
PRO
0
140
Introduction to Bill One Development Engineer
sansan33
PRO
0
340
202512_AIoT.pdf
iotcomjpadmin
0
190
2025-12-27 Claude CodeでPRレビュー対応を効率化する@機械学習社会実装勉強会第54回
nakamasato
4
1.4k
松尾研LLM講座2025 応用編Day3「軽量化」 講義資料
aratako
15
4.9k
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
1
850
チームで安全にClaude Codeを利用するためのプラクティス / team-claude-code-practices
tomoki10
6
3.1k
AI との良い付き合い方を僕らは誰も知らない (WSS 2026 静岡版)
asei
1
260
Oracle Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
2
780
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
17k
Featured
See All Featured
Designing for Performance
lara
610
70k
The Limits of Empathy - UXLibs8
cassininazir
1
200
WCS-LA-2024
lcolladotor
0
410
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
61
48k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
180
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
140
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
0
34
Designing Powerful Visuals for Engaging Learning
tmiket
0
200
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
190
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
230
Facilitating Awesome Meetings
lara
57
6.7k
Transcript
܅ ͷ ໊ ɻ ୀձͨ͠Ϣʔβ 0UFNBDIJSC 4IV0("8"3" !FYQBKQ 1IPUPCZ/FJM3PTFOTUFDI
PO6OTQMBTI
1 !
Rails
n & %(@expajp) – ! – 3
– Ruby/Rails(1 • Project Euler 100 • Vue.js+ – # ' " – *$ )
CM
View
n post creatornil
n post
n DB posts ! user_id NULL " 0 #
n post
n DB posts ! user_id NULL " 0 #
,
n B83+,.02@A' " % – ,.020 ;E(15*,47<: $#D=
n View6-/)'C9 ? " % &" – View!6-/)'? – DRY>%
n & #$ n
'!" %
N+1
N+1 Q . L S 0 N Q . 11
N+1 / Eager Loading - Rails Webook https://ruby-rails.hatenadiary.com/entry/20141108/1415418367 ’’
N+1 n DB
→
٫Լʂ
CTO
n Active Record/. creator_id0 - * n Decorator,#4(
*&!)$+ " → post'%*&!)30$+ → DRY21
Active Record
Decorator
View
ҟٞ͋Γʂ
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 ’’
n 06:?)<5DE n Decorator7*F2(> +' -4@1% –
"#! . n gem9(,38C – B/) & ;A3 $/=
NullUser, SystemUser
n Decorator Post creator n User
full_name n Post NullUser, SystemUser – full_name ! n creator User, NullUser, SystemUser
User
NullUser, SystemUser
Post
!
n DB5-6 & %!* #($). –
View,1 '! n 70+4 "*/ 32
n )$ " !'( n
View#*%&
1. 2.
3. NullUser, SystemUser
!
n ;&B5$ – ?< 12$'*/+-@ – full_nameA03 %
n ;D …… – 89" FE – DRY" n ;&,(-.4=6,). C :$# >7 !
n (#&')!% #@ n Rails0-= – *"$!,E?28DRYF<251A
– I74C>6 n +3D 9:HJ;B – /.G+3D