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
0
390
【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
あなたの「仮説検証」、ゆがんでいませんか? / Isn't Your "Hypothesis Verification" Distorted? #emoasis
expajp
1
330
Rubyはなぜ「たのしい」のか? / Why is Ruby a programmers' best friend? #tqrk15
expajp
5
2k
エンジニアリングマネージャーはどう学んでいくのか #devsumi / How Do Engineering Managers Continue to Learn and Grow?
expajp
8
4.8k
RubyKaigi参加歴をふりかえる / Looking Back on My RubyKaigi Participation History #kaigieffectLT
expajp
3
480
わたしのメタ学習 / My Own Meta Learning #shinjukurb
expajp
0
440
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
39k
【2019/07/06 TamaRuby会議01】brainf*ck処理系で理解するパターンマッチングをつかった疎結合な実装
expajp
2
2.7k
その正規表現、異議あり! 〜 ReDoSについて
expajp
2
5.8k
Other Decks in Technology
See All in Technology
ソフトウェアテストのAI活用_ver1.20
fumisuke
0
220
Autonomous Database サービス・アップデート (FY25)
oracle4engineer
PRO
1
730
MCPを利用して自然言語で3Dプリントしてみよう!
hamadakoji
0
1.1k
Tenstorrent HW/SW 概要説明
tenstorrent_japan
0
230
データ戦略部門 紹介資料
sansan33
PRO
1
3.1k
JavaのMCPサーバーで体験するAIエージェントの世界
tatsuya1bm
1
210
GitHub Copilot Use Cases at ZOZO
horie1024
1
350
これならできる!Kotlin・Spring・DDDを活用したAll in oneのマイクロサービス開発術
demaecan
0
120
OpenJDKエコシステムと開発中の機能を紹介 2025夏版
chiroito
1
1.1k
Kubernetesで作るAIプラットフォーム
oracle4engineer
PRO
2
180
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
6.7k
dbt Cloudの新機能を紹介!データエンジニアリングの民主化:GUIで操作、SQLで管理する新時代のdbt Cloud
sagara
0
120
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
94
13k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3k
Producing Creativity
orderedlist
PRO
346
40k
Making Projects Easy
brettharned
116
6.2k
Six Lessons from altMBA
skipperchong
28
3.8k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
Embracing the Ebb and Flow
colly
85
4.7k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Documentation Writing (for coders)
carmenintech
71
4.8k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
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 ' $