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
160
あなたの知らないDateのひみつ / The Secret of "Date" You Haven't known #tqrk16
expajp
0
160
入門 FormObject / An Introduction to FormObject #kaigionrails
expajp
2
6.8k
あなたの「仮説検証」、ゆがんでいませんか? / Isn't Your "Hypothesis Verification" Distorted? #emoasis
expajp
2
560
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
630
わたしのメタ学習 / 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
管理アカウント単一運用からAWS Organizationsに移行するの大変で滅
hiramax
0
230
キャリア25年目にしてTypeScript に出会うまで - 「型」を通じて振り返るプログラミング言語遍歴 / Meeting TypeScript After 25 Years in Tech - Looking Back at My Programming Language Journey Through "Types"
bitkey
PRO
2
280
RubyでRuby拡張を書いたらRubyより35倍速になったってどういうこと??
kazuho
3
610
Harnessing the Power of Mocks and Stubs in PHPUnit / #laravellivejp
asumikam
0
560
GitHub Copilot CLI の Rubber Duck 機能を使ってコーディングの品質をあげよう #techbaton_findy
stefafafan
2
1.1k
なぜハノーバーメッセに行くべきなのか 〜初参加だから語れること〜
tanakaseiya
0
110
AI駆動開発でなんでもハンズオン環境をつくってみた
yoshimi0227
0
130
論文紹介:Pixal3D (SIGGRAPH 2026)
tenten0727
0
730
CloudFront VPCオリジンとVPC Latticeサービスの内部ALBをマルチアカウントで一元利用しよう
duelist2020jp
5
230
基礎から解説!Icebergで紐解くSnowflake×Databricks連携の現在地
cm_yasuhara
0
310
開発にAIを組織として取り入れる一歩目とその後
yujishibuya
0
220
「使われるデータ基盤」を目指してデータアナリストとワークショップをやった話
jackojacko_
2
860
Featured
See All Featured
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
180
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Paper Plane
katiecoart
PRO
1
50k
So, you think you're a good person
axbom
PRO
2
2k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
290
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Building Applications with DynamoDB
mza
96
7k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
140
Documentation Writing (for coders)
carmenintech
77
5.3k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
180
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 ' $