$30 off During Our Annual Pro Sale. View Details »
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
85
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
ソフトウェア設計の課題・原則・実践技法
masuda220
PRO
24
20k
宅宅自以為的浪漫:跟 AI 一起為自己辦的研討會寫一個售票系統
eddie
0
430
Web エンジニアが JavaScript で AI Agent を作る / JSConf JP 2025 sponsor session
izumin5210
4
2.1k
AIと協働し、イベントソーシングとアクターモデルで作る後悔しないアーキテクチャ Regret-Free Architecture with AI, Event Sourcing, and Actors
tomohisa
5
16k
【レイトレ合宿11】kagayaki_v4
runningoutrate
0
210
Querying Design System デザインシステムの意思決定を支える構造検索
ikumatadokoro
1
1.2k
Atomics APIを知る / Understanding Atomics API
ssssota
1
240
スタートアップを支える技術戦略と組織づくり
pospome
8
14k
CSC305 Lecture 15
javiergs
PRO
0
220
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
180
Microservices rules: What good looks like
cer
PRO
0
330
React Native New Architecture 移行実践報告
taminif
1
130
Featured
See All Featured
Producing Creativity
orderedlist
PRO
348
40k
KATA
mclloyd
PRO
32
15k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Automating Front-end Workflow
addyosmani
1371
200k
GraphQLとの向き合い方2022年版
quramy
49
14k
Mobile First: as difficult as doing things right
swwweet
225
10k
Why Our Code Smells
bkeepers
PRO
340
57k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Practical Orchestrator
shlominoach
190
11k
Balancing Empowerment & Direction
lara
5
770
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
69k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
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
감사합니다.