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
460
Amazon ec2 container service 소개
seapy
0
83
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
42
Rails Database Migrations - RORLab Season 3-3
seapy
2
97
Other Decks in Programming
See All in Programming
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
270
rails newと同時に型を書く
aki19035vc
6
730
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
1.1k
Compose でデザインと実装の差異を減らすための取り組み
oidy
1
220
定理証明プラットフォーム lapisla.net
abap34
1
600
HTML/CSS超絶浅い説明
yuki0329
0
200
20241217 競争力強化とビジネス価値創出への挑戦:モノタロウのシステムモダナイズ、開発組織の進化と今後の展望
monotaro
PRO
0
340
Immutable ActiveRecord
megane42
0
110
知られざるDMMデータエンジニアの生態 〜かつてツチノコと呼ばれし者〜
takaha4k
3
940
月刊 競技プログラミングをお仕事に役立てるには
terryu16
1
1.2k
オニオンアーキテクチャを使って、 Unityと.NETでコードを共有する
soi013
0
380
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
450
Featured
See All Featured
Embracing the Ebb and Flow
colly
84
4.5k
Designing for Performance
lara
604
68k
YesSQL, Process and Tooling at Scale
rocio
170
14k
Docker and Python
trallard
43
3.2k
GraphQLとの向き合い方2022年版
quramy
44
13k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.5k
A Tale of Four Properties
chriscoyier
157
23k
Unsuck your backbone
ammeep
669
57k
Automating Front-end Workflow
addyosmani
1367
200k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
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
감사합니다.