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/04/12 Otemachi.rb#5】has_one :throughの憂鬱
Search
Shu OGAWARA
April 12, 2018
Technology
430
0
Share
【2018/04/12 Otemachi.rb#5】has_one :throughの憂鬱
2018/04/12 Otemachi.rb#5での発表資料です。
Shu OGAWARA
April 12, 2018
More Decks by Shu OGAWARA
See All by Shu OGAWARA
人生を変えた一冊「独学大全」のはなし / Self-study ENCYCLOPEDIA: The Book Which Change My Life #独学大全 #EM推し本
expajp
0
150
あなたの知らないDateのひみつ / The Secret of "Date" You Haven't known #tqrk16
expajp
0
160
入門 FormObject / An Introduction to FormObject #kaigionrails
expajp
2
6.7k
あなたの「仮説検証」、ゆがんでいませんか? / Isn't Your "Hypothesis Verification" Distorted? #emoasis
expajp
2
550
Rubyはなぜ「たのしい」のか? / Why is Ruby a programmers' best friend? #tqrk15
expajp
5
2.1k
エンジニアリングマネージャーはどう学んでいくのか #devsumi / How Do Engineering Managers Continue to Learn and Grow?
expajp
9
5.8k
RubyKaigi参加歴をふりかえる / Looking Back on My RubyKaigi Participation History #kaigieffectLT
expajp
3
620
わたしのメタ学習 / My Own Meta Learning #shinjukurb
expajp
0
520
ActiveSupport::Concernで開くメタプログラミングの扉 #heiseirubykaigi / The door of meta-programing is opened by ActiveSupport::Concern
expajp
1
2.4k
Other Decks in Technology
See All in Technology
生成AIが変える SaaS の競争原理と弁護士ドットコムのプロダクト戦略
bengo4com
1
3.1k
Keeping Ruby Running on Cygwin
fd0
0
200
Building Production-Ready Agents Microsoft Agent Framework
_mertmetin
0
130
ハーネスエンジニアリングをやりすぎた話 ~そのハーネスは解体された~
gotalab555
5
1.9k
Google Cloud Next '26 の裏でこっそりリリースされたCloud Number Registry & Cloud Hub コスト分析 を試してみた
hikaru1001
0
140
AI駆動開発で生産性を追いかけたら、行き着いたのは品質とシフトレフトだった
littlehands
0
140
20260428_Product Management Summit_tadokoroyoshiro
tadokoro_yoshiro
15
17k
UIライブラリに依存しすぎないReact Native設計を目指して
grandbig
0
180
社内エンジニア勉強会の醍醐味と苦しみ/tamadev
nishiuma
0
270
バイブコーディングで3倍早く⚪⚪を作ってみた
samakada
0
210
Choose your own adventure in agentic design patterns
glaforge
0
160
AI バイブコーティングでキーボード不要?!
samakada
0
670
Featured
See All Featured
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
430
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
Color Theory Basics | Prateek | Gurzu
gurzu
0
300
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
480
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.6k
Prompt Engineering for Job Search
mfonobong
0
280
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
130
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
The Cost Of JavaScript in 2023
addyosmani
55
9.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Transcript
2018/04/12 Otemachi.rb#5 has_one :through Shu OGAWARA (@expajp)
35* n /$ .(@expajp) – &' • 3!2! –
Ruby/Rails210, – -+ – )1#"%( – 6+4
1 1 n
n
1 1 n
n
1 1 n
n has_many :through
1 1 n
n has_one :through has_many :through
has_many :through has_ many belongs_ to
has_ many belongs_ to
has_one :through has_ one belongs_ to
has_ one belongs_ to
Matter Contact User
n N+1 Query n
n matter.main_operator
scope n ' n 1"&
# %)!( n $
has_one :through n through
has_one :through n through
has_one :through n through " ! n
conditions -> { where(…) } #
n ## $( $ % n has_one :through &%!
" n ' $