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
45
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
450
Amazon ec2 container service 소개
seapy
0
82
boot2docker 사용시 컨테이너에서 생성한 데이터를 유지하기
seapy
0
79
Elasticsearch + fluentd for Log analysis
seapy
3
9.9k
ActiveRecord Associations(1) - RORLab Season 3-7
seapy
0
64
ActiveRecord Observers - RORLab Season 3-6
seapy
0
45
ActiveRecord Callbacks - RORLab Season 3-5
seapy
0
41
Rails Database Migrations - RORLab Season 3-3
seapy
2
97
Other Decks in Programming
See All in Programming
ヤプリ新卒SREの オンボーディング
masaki12
0
130
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
190
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Macとオーディオ再生 2024/11/02
yusukeito
0
370
最新TCAキャッチアップ
0si43
0
140
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
890
役立つログに取り組もう
irof
28
9.6k
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
Click-free releases & the making of a CLI app
oheyadam
2
110
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
120
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.1k
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
910
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
40
2.4k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Fireside Chat
paigeccino
34
3k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Faster Mobile Websites
deanohume
305
30k
We Have a Design System, Now What?
morganepeng
50
7.2k
Building an army of robots
kneath
302
43k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Raft: Consensus for Rubyists
vanstee
136
6.6k
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
감사합니다.