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
360
【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
Rubyはなぜ「たのしい」のか? / Why is Ruby a programmers' best friend? #tqrk15
expajp
4
1.8k
エンジニアリングマネージャーはどう学んでいくのか #devsumi / How Do Engineering Managers Continue to Learn and Grow?
expajp
7
2.4k
RubyKaigi参加歴をふりかえる / Looking Back on My RubyKaigi Participation History #kaigieffectLT
expajp
3
380
わたしのメタ学習 / My Own Meta Learning #shinjukurb
expajp
0
360
ActiveSupport::Concernで開くメタプログラミングの扉 #heiseirubykaigi / The door of meta-programing is opened by ActiveSupport::Concern
expajp
1
2.1k
実践Railsアプリケーション設計 #meetup_rails / Practical Rails Application Design
expajp
4
38k
【2019/07/06 TamaRuby会議01】brainf*ck処理系で理解するパターンマッチングをつかった疎結合な実装
expajp
2
2.6k
その正規表現、異議あり! 〜 ReDoSについて
expajp
2
5.4k
【2018/12/08 RailsDM】「あの人」に学ぶ!駆け出しRailsエンジニアの日常の過ごし方
expajp
9
1.3k
Other Decks in Technology
See All in Technology
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
220
Chasing the White Whale of Open Source - ROI
mrbobbytables
0
120
Amazon Forecast亡き今、我々がマネージドサービスに頼らず時系列予測を実行する方法
sadynitro
0
160
SDNという名のデータプレーンプログラミングの歴史
ebiken
PRO
2
200
Introduction to Works of ML Engineer in LY Corporation
lycorp_recruit_jp
0
160
Storybook との上手な向き合い方を考える
re_taro
5
2.5k
アジャイルチームがらしさを発揮するための目標づくり / Making the goal and enabling the team
kakehashi
4
260
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
250
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
180
Mastering Quickfix
daisuzu
1
350
SAP Community and Developer Update
sygyzmundovych
0
350
Security-JAWS【第35回】勉強会クラウドにおけるマルウェアやコンテンツ改ざんへの対策
4su_para
0
200
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
45
6.8k
Bash Introduction
62gerente
608
210k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Music & Morning Musume
bryan
46
6.2k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
730
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
850
Typedesign – Prime Four
hannesfritz
40
2.4k
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 ' $