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
ActiveRecord Associations(2) - RORLab Season 3-8
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
seapy
June 04, 2013
Programming
52
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ActiveRecord Associations(2) - RORLab Season 3-8
about ActiveRecord Polymorphic, Self-join
seapy
June 04, 2013
More Decks by seapy
See All by seapy
Lambda + S3 썸네일 생성 및 운영 - AWSKRUG 정기 세미나 (2016년 9월)
seapy
1
560
형태소 분석기를 적용한 elasticsearch 운영
seapy
0
480
Amazon ec2 container service 소개
seapy
0
92
boot2docker 사용시 컨테이너에서 생성한 데이터를 유지하기
seapy
0
86
Elasticsearch + fluentd for Log analysis
seapy
3
10k
ActiveRecord Associations(1) - RORLab Season 3-7
seapy
0
73
ActiveRecord Observers - RORLab Season 3-6
seapy
0
49
ActiveRecord Callbacks - RORLab Season 3-5
seapy
0
50
Rails Database Migrations - RORLab Season 3-3
seapy
2
110
Other Decks in Programming
See All in Programming
スマートグラスで並列バイブコーディング
hyshu
0
240
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
150
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
720
AI時代のUIはどこへ行く?その2!
yusukebe
22
7.4k
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
110
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
260
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
550
A2UI という光を覗いてみる
satohjohn
1
140
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
550
OSもどきOS
arkw
0
580
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
370
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
11
6k
Featured
See All Featured
Odyssey Design
rkendrick25
PRO
2
700
Chasing Engaging Ingredients in Design
codingconduct
0
220
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
440
The SEO Collaboration Effect
kristinabergwall1
1
490
Side Projects
sachag
455
43k
KATA
mclloyd
PRO
35
15k
Thoughts on Productivity
jonyablonski
76
5.2k
Designing for Performance
lara
611
70k
ラッコキーワード サービス紹介資料
rakko
1
3.7M
The World Runs on Bad Software
bkeepers
PRO
72
12k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
220
Transcript
Active Record Associations (2) Ror lab. season 3 - the
8th round - Jung 4, 2013 ChangHoon Jeong(@seapy)
Product id Employee id Picture Polymorphic Picture employee_id product_id x
Product id Employee id Polymorphic What about this “Picture” model
? Picture employee_id product_id Picture product_id employee_id
Polymorphic Picture Picture Employee Product id id Imageable Imageable id
id imageable_id imageable_id :imageable_id :imageable_type :as => :imageable
Polymorphic Model Class
Polymorphic Migration
Self Joins • ex. : following or follower
감사합니다.