Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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.5k
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時代のワークフロー設計〜Durable Functions / Step Functions / Strands Agents を添えて〜
yakumo
3
1.3k
2025-12-18_AI駆動開発推進プロジェクト運営について / AIDD-Promotion project management
yayoi_dd
0
130
CARTAのAI CoE が挑む「事業を進化させる AI エンジニアリング」 / carta ai coe evolution business ai engineering
carta_engineering
0
2.1k
20251219 OpenIDファウンデーション・ジャパン紹介 / OpenID Foundation Japan Intro
oidfj
0
260
100以上の新規コネクタ提供を可能にしたアーキテクチャ
ooyukioo
0
140
寫了幾年 Code,然後呢?軟體工程師必須重新認識的 DevOps
cheng_wei_chen
1
1.5k
AIプラットフォームにおけるMLflowの利用について
lycorptech_jp
PRO
1
170
Microsoft Agent 365 についてゆっくりじっくり理解する!
skmkzyk
0
400
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
GitHub Copilotを使いこなす 実例に学ぶAIコーディング活用術
74th
3
3.6k
Strands AgentsとNova 2 SonicでS2Sを実践してみた
yama3133
1
950
NIKKEI Tech Talk #41: セキュア・バイ・デザインからクラウド管理を考える
sekido
PRO
0
160
Featured
See All Featured
Designing Powerful Visuals for Engaging Learning
tmiket
0
180
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
120
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
2
2.7k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Practical Orchestrator
shlominoach
190
11k
Code Reviewing Like a Champion
maltzj
527
40k
Building Applications with DynamoDB
mza
96
6.8k
How to build a perfect <img>
jonoalderson
0
4.6k
How to Think Like a Performance Engineer
csswizardry
28
2.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The Language of Interfaces
destraynor
162
25k
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 ' $