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
110
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
36k
【2019/07/06 TamaRuby会議01】brainf*ck処理系で理解するパターンマッチングをつかった疎結合な実装
expajp
2
2.4k
その正規表現、異議あり! 〜 ReDoSについて
expajp
2
4.9k
【2018/12/08 RailsDM】「あの人」に学ぶ!駆け出しRailsエンジニアの日常の過ごし方
expajp
8
1.2k
【2018/09/18 Otemachi.rb#9】君(退会したユーザ)の名は。
expajp
0
430
【2018/07/29 TokyuRuby会議12】Project Eulerから生まれたワンライナーたち
expajp
0
540
【2018/07/10 Otemachi.rb#8】情報収集どうしてますか?
expajp
0
620
Other Decks in Technology
See All in Technology
クラウドサインにおけるプロダクトマネージャーの役割と開発プロセス / 20240410_cloudsign-PdM
bengo4com
1
680
コンテナセキュリティの基本と脅威への対策
kyohmizu
3
700
Data and AI Governance: Existing Challenges and Emerging Trends
scotthsieh825
0
150
OpenTelemetry を使ったトレースエグザンプラーの活用 / otel-trace-exemplar
k6s4i53rx
2
640
検証を通して見えてきたTiDBの性能特性
lycorptech_jp
PRO
6
3.4k
〜小さく始めて大きく育てる〜データ分析基盤の開発から活用まで
kniino
0
2k
The CloudCompare project by Dr. Daniel Girardeau-Montaut
kentaitakura
0
510
Oracle Cloud Infrastructure:2024年4月度サービス・アップデート
oracle4engineer
PRO
1
110
Databricksを活用してDELISH KITCHENのレシピレコメンドを開発した話
furu8
0
250
普段有償でサポート業務をしているCSAが技術知見を無料で公開する理由
07jp27
1
640
株式会社EventHub・エンジニア採用資料
eventhub
0
1.9k
Autonomous Database Cloud 技術詳細 / adb-s_technical_detail_jp
oracle4engineer
PRO
14
35k
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
20
1.6k
KATA
mclloyd
14
12k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
60
14k
What's new in Ruby 2.0
geeforr
337
31k
The Power of CSS Pseudo Elements
geoffreycrofte
59
5k
GitHub's CSS Performance
jonrohan
1023
450k
Making Projects Easy
brettharned
108
5.5k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
How GitHub (no longer) Works
holman
304
140k
Side Projects
sachag
451
41k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
273
13k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
186
16k
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 ' $