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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
seapy
June 04, 2013
Programming
50
0
Share
ActiveRecord Associations(2) - RORLab Season 3-8
about ActiveRecord Polymorphic, Self-join
seapy
June 04, 2013
More Decks by seapy
See All by seapy
Lambda + S3 썸네일 생성 및 운영 - AWSKRUG 정기 세미나 (2016년 9월)
seapy
1
560
형태소 분석기를 적용한 elasticsearch 운영
seapy
0
480
Amazon ec2 container service 소개
seapy
0
88
boot2docker 사용시 컨테이너에서 생성한 데이터를 유지하기
seapy
0
83
Elasticsearch + fluentd for Log analysis
seapy
3
10k
ActiveRecord Associations(1) - RORLab Season 3-7
seapy
0
71
ActiveRecord Observers - RORLab Season 3-6
seapy
0
49
ActiveRecord Callbacks - RORLab Season 3-5
seapy
0
48
Rails Database Migrations - RORLab Season 3-3
seapy
2
100
Other Decks in Programming
See All in Programming
「効かない!」依存性注入(DI)を活用したAPI Platformのエラーハンドリング奮闘記
mkmk884
0
290
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
210
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
210
Symfonyの特性(設計思想)を手軽に活かす特性(trait)
ickx
0
110
GoのDB アクセスにおける 「型安全」と「柔軟性」の両立 - Bob という選択肢
tak848
0
300
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
4.1k
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2.2k
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
1
230
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
1.3k
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
1.2k
KagglerがMixSeekを触ってみた
morim
0
360
ファインチューニングせずメインコンペを解く方法
pokutuna
0
250
Featured
See All Featured
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
95
Design in an AI World
tapps
0
190
Are puppies a ranking factor?
jonoalderson
1
3.2k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
Designing Experiences People Love
moore
143
24k
How to make the Groovebox
asonas
2
2.1k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
53k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.1k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
300
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
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
감사합니다.