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
330
【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
わたしのメタ学習 / My Own Meta Learning #shinjukurb
expajp
0
180
ActiveSupport::Concernで開くメタプログラミングの扉 #heiseirubykaigi / The door of meta-programing is opened by ActiveSupport::Concern
expajp
1
1.9k
実践Railsアプリケーション設計 #meetup_rails / Practical Rails Application Design
expajp
4
37k
【2019/07/06 TamaRuby会議01】brainf*ck処理系で理解するパターンマッチングをつかった疎結合な実装
expajp
2
2.5k
その正規表現、異議あり! 〜 ReDoSについて
expajp
2
5k
【2018/12/08 RailsDM】「あの人」に学ぶ!駆け出しRailsエンジニアの日常の過ごし方
expajp
8
1.2k
【2018/09/18 Otemachi.rb#9】君(退会したユーザ)の名は。
expajp
0
440
【2018/07/29 TokyuRuby会議12】Project Eulerから生まれたワンライナーたち
expajp
0
550
【2018/07/10 Otemachi.rb#8】情報収集どうしてますか?
expajp
0
620
Other Decks in Technology
See All in Technology
Step by Stepで学ぶ、ADT(代数的データ型)、モナドからEffect-TSまで
leveragestech
1
3k
Password cracking: past, present, future
openwall
0
270
CockroachDB はどのくらい「しぶとい」のか? / How tough is CockroachDB?
kota2and3kan
13
4.9k
回り回って効いてくる副次的効果としての技術広報/techpr
nishiuma
1
180
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
9
37k
LLM評価の落とし穴~開発者目線で気をつけるポイント~
rishigami
11
3.2k
動画配信サービスのフロントエンド実装に学ぶ設計原則
yud0uhu
1
130
SWC Transformerから見るTypeScript関数記述ベストプラクティス
fujiyamaorange
1
180
スクラムに出会って「できた」を実感できるようになってきた話 / Scrum makes me feel like I can do it
yayoi_dd
2
110
大規模言語モデル (LLM)における低精度数値表現
pfn
PRO
3
820
[2024년 5월 세미나] 생성형 AI와 함께하는 데이터 분석가 커리어
datarian
0
1.2k
グイグイ系QAエンジニアでやっていくよ!
____rina____
0
770
Featured
See All Featured
In The Pink: A Labor of Love
frogandcode
138
21k
Writing Fast Ruby
sferik
622
60k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
21
2k
[RailsConf 2023] Rails as a piece of cake
palkan
28
4.1k
Building Flexible Design Systems
yeseniaperezcruz
320
37k
The Illustrated Children's Guide to Kubernetes
chrisshort
32
47k
Designing the Hi-DPI Web
ddemaree
276
33k
Building a Scalable Design System with Sketch
lauravandoore
457
32k
Automating Front-end Workflow
addyosmani
1357
200k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
660
120k
Embracing the Ebb and Flow
colly
80
4.2k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
14
1.5k
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 ' $