Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ActiveRecord Associations(2) - RORLab Season 3-8
Search
seapy
June 04, 2013
Programming
55
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ActiveRecord Associations(2) - RORLab Season 3-8
about ActiveRecord Polymorphic, Self-join
seapy
June 04, 2013
Transcript
8 slides
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
감사합니다.
More Decks by seapy
See All by seapy
Lambda + S3 썸네일 생성 및 운영 - AWSKRUG 정기 세미나 (2016년 9월)
seapy
1
560
형태소 분석기를 적용한 elasticsearch 운영
seapy
0
490
Amazon ec2 container service 소개
seapy
0
100
boot2docker 사용시 컨테이너에서 생성한 데이터를 유지하기
seapy
0
94
Elasticsearch + fluentd for Log analysis
seapy
3
10k
ActiveRecord Associations(1) - RORLab Season 3-7
seapy
0
76
ActiveRecord Observers - RORLab Season 3-6
seapy
0
56
ActiveRecord Callbacks - RORLab Season 3-5
seapy
0
57
Rails Database Migrations - RORLab Season 3-3
seapy
2
110
Other Decks in Programming
See All in Programming
祈るテストから、探索するテストへ 〜Lincheckではじめる並行処理テスト〜
yyh_gl
0
430
Crash Auto Pipelines
veronikapj
1
450
正解の無い問題を 「できるだけ上手く」解く ヒューリスティックで感性を磨こう。〜現実課題をプログラミングで解きあうコミュニティについて〜
allegrogiken
0
110
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
190
SONY CISC-NEWS NWS-1750 + NWB-225 ハードウェアメンテとフレームバッファカラー対応 / KOF2026
tsutsui
0
130
将来の標準フォーマッター?ktfmtを深堀る
t45k
0
250
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
230
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
780
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
170
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
390
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
190
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
630
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
Rails Girls Zürich Keynote
gr2m
96
14k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
360
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.9k
Paper Plane
katiecoart
PRO
6
55k
Navigating Team Friction
lara
192
16k
Color Theory Basics | Prateek | Gurzu
gurzu
1
530
Typedesign – Prime Four
hannesfritz
42
3.2k
Amusing Abliteration
ianozsvald
1
400
Building Better People: How to give real-time feedback that sticks.
wjessup
371
20k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
580
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k