$30 off During Our Annual Pro Sale. View Details »
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
0
410
【2018/04/12 Otemachi.rb#5】has_one :throughの憂鬱
2018/04/12 Otemachi.rb#5での発表資料です。
Shu OGAWARA
April 12, 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
120
入門 FormObject / An Introduction to FormObject #kaigionrails
expajp
2
4.9k
あなたの「仮説検証」、ゆがんでいませんか? / Isn't Your "Hypothesis Verification" Distorted? #emoasis
expajp
2
430
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
530
わたしのメタ学習 / My Own Meta Learning #shinjukurb
expajp
0
480
ActiveSupport::Concernで開くメタプログラミングの扉 #heiseirubykaigi / The door of meta-programing is opened by ActiveSupport::Concern
expajp
1
2.3k
実践Railsアプリケーション設計 #meetup_rails / Practical Rails Application Design
expajp
4
40k
Other Decks in Technology
See All in Technology
AIプラットフォームにおけるMLflowの利用について
lycorptech_jp
PRO
1
180
IAMユーザーゼロの運用は果たして可能なのか
yama3133
2
510
特別捜査官等研修会
nomizone
0
370
AI-DLCを現場にインストールしてみた:プロトタイプ開発で分かったこと・やめたこと
recruitengineers
PRO
2
190
S3を正しく理解するための内部構造の読解
nrinetcom
PRO
3
210
Databricks向けJupyter Kernelでデータサイエンティストの開発環境をAI-Readyにする / Data+AI World Tour Tokyo After Party
genda
1
620
AI駆動開発の実践とその未来
eltociear
1
420
AWS CLIの新しい認証情報設定方法aws loginコマンドの実態
wkm2
7
780
コンテキスト情報を活用し個社最適化されたAI Agentを実現する4つのポイント
kworkdev
PRO
1
1.7k
普段使ってるClaude Skillsの紹介(by Notebooklm)
zerebom
2
850
たまに起きる外部サービスの障害に備えたり備えなかったりする話
egmc
0
340
AWS Security Agentの紹介/introducing-aws-security-agent
tomoki10
0
350
Featured
See All Featured
Writing Fast Ruby
sferik
630
62k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
75
Chasing Engaging Ingredients in Design
codingconduct
0
75
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
110
Building Applications with DynamoDB
mza
96
6.8k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
120
エンジニアに許された特別な時間の終わり
watany
105
220k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Designing Experiences People Love
moore
143
24k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Why Our Code Smells
bkeepers
PRO
340
57k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
0
68
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 ' $