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
380
【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
150
Rubyはなぜ「たのしい」のか? / Why is Ruby a programmers' best friend? #tqrk15
expajp
5
1.9k
エンジニアリングマネージャーはどう学んでいくのか #devsumi / How Do Engineering Managers Continue to Learn and Grow?
expajp
8
4.4k
RubyKaigi参加歴をふりかえる / Looking Back on My RubyKaigi Participation History #kaigieffectLT
expajp
3
430
わたしのメタ学習 / My Own Meta Learning #shinjukurb
expajp
0
410
ActiveSupport::Concernで開くメタプログラミングの扉 #heiseirubykaigi / The door of meta-programing is opened by ActiveSupport::Concern
expajp
1
2.2k
実践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.6k
Other Decks in Technology
See All in Technology
Vision Language Modelを活用した メルカリの類似画像レコメンドの性能改善
yadayuki
8
930
移行できそうでやりきれなかった 10年超えのシステムを葬るための戦略
ryu955
2
170
AIが変えるソフトウェア開発__未来のアジャイルチームとは__.pdf
buchirei
0
360
パスキー導入の課題と ベストプラクティス、今後の展望
ritou
7
1k
目次機能実装から理解するLexical Editor
wtdlee
0
130
Reactを段階的に覗いてみる
ytaisei
2
830
RubyKaigi 2025でプロポーザルが初めて採択されるまでにやったこと
yuuu
1
270
EM初心者として半年間マネジャーをやってみて分かったこと
sansantech
PRO
0
190
Cline、めっちゃ便利、お金が飛ぶ💸
iwamot
13
13k
技術的負債を正しく理解し、正しく付き合う #phperkaigi / PHPerKaigi 2025
shogogg
7
1.5k
BCMathを高速化した一部始終をC言語でガチ目に解説する / BCMath performance improvement explanation
sakitakamachi
2
620
RAGの基礎から実践運用まで:AWS BedrockとLangfuseで実現する構築・監視・評価
sonoda_mj
0
400
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
52
11k
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.4k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.6k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.6k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
11
600
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
Building Your Own Lightsaber
phodgson
104
6.3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.2k
Making Projects Easy
brettharned
116
6.1k
A Tale of Four Properties
chriscoyier
158
23k
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 ' $