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
67
ActiveRecord Observers - RORLab Season 3-6
seapy
0
47
ActiveRecord Callbacks - RORLab Season 3-5
seapy
0
45
Rails Database Migrations - RORLab Season 3-3
seapy
2
99
Other Decks in Programming
See All in Programming
Julia という言語について (FP in Julia « SIDE: F ») for 関数型まつり2025
antimon2
3
980
Benchmark
sysong
0
270
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
230
技術同人誌をMCP Serverにしてみた
74th
1
380
Team operations that are not burdened by SRE
kazatohiei
1
260
今ならAmazon ECSのサービス間通信をどう選ぶか / Selection of ECS Interservice Communication 2025
tkikuc
20
3.7k
たった 1 枚の PHP ファイルで実装する MCP サーバ / MCP Server with Vanilla PHP
okashoi
1
200
Cline指示通りに動かない? AI小説エージェントで学ぶ指示書の書き方と自動アップデートの仕組み
kamomeashizawa
1
580
Deep Dive into ~/.claude/projects
hiragram
9
1.6k
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
5
1.4k
WindowInsetsだってテストしたい
ryunen344
1
200
来たるべき 8.0 に備えて React 19 新機能と React Router 固有機能の取捨選択とすり合わせを考える
oukayuka
2
860
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
Writing Fast Ruby
sferik
628
61k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
5
220
The Cult of Friendly URLs
andyhume
79
6.5k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Building an army of robots
kneath
306
45k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
930
Designing for Performance
lara
609
69k
Adopting Sorbet at Scale
ufuk
77
9.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
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
감사합니다.