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
seapy
June 04, 2013
Programming
0
47
ActiveRecord Associations(2) - RORLab Season 3-8
about ActiveRecord Polymorphic, Self-join
seapy
June 04, 2013
Tweet
Share
More Decks by seapy
See All by seapy
Lambda + S3 썸네일 생성 및 운영 - AWSKRUG 정기 세미나 (2016년 9월)
seapy
1
550
형태소 분석기를 적용한 elasticsearch 운영
seapy
0
480
Amazon ec2 container service 소개
seapy
0
84
boot2docker 사용시 컨테이너에서 생성한 데이터를 유지하기
seapy
0
81
Elasticsearch + fluentd for Log analysis
seapy
3
10k
ActiveRecord Associations(1) - RORLab Season 3-7
seapy
0
69
ActiveRecord Observers - RORLab Season 3-6
seapy
0
47
ActiveRecord Callbacks - RORLab Season 3-5
seapy
0
46
Rails Database Migrations - RORLab Season 3-3
seapy
2
99
Other Decks in Programming
See All in Programming
20251016_Rails News ~Rails 8.1の足音を聴く~
morimorihoge
3
730
あなたとKaigi on Rails / Kaigi on Rails + You
shimoju
0
190
他言語経験者が Golangci-lint を最初のコーディングメンターにした話 / How Golangci-lint Became My First Coding Mentor: A Story from a Polyglot Programmer
uma31
0
420
Writing Better Go: Lessons from 10 Code Reviews
konradreiche
3
6.8k
Developer Joy - The New Paradigm
hollycummins
1
370
Leading Effective Engineering Teams in the AI Era
addyosmani
7
620
Claude Agent SDK を使ってみよう
hyshu
0
1.4k
One Enishi After Another
snoozer05
PRO
0
160
開発組織の戦略的な役割と 設計スキル向上の効果
masuda220
PRO
9
1.6k
Introduce Hono CLI
yusukebe
6
3.1k
ソフトウェア設計の実践的な考え方
masuda220
PRO
4
660
Go言語はstack overflowの夢を見るか?
logica0419
0
600
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
225
10k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Building an army of robots
kneath
305
46k
Speed Design
sergeychernyshev
32
1.2k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Fireside Chat
paigeccino
41
3.7k
Building Adaptive Systems
keathley
44
2.8k
Thoughts on Productivity
jonyablonski
70
4.9k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
2.9k
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
감사합니다.