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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
84
Elasticsearch + fluentd for Log analysis
seapy
3
10k
ActiveRecord Associations(1) - RORLab Season 3-7
seapy
0
72
ActiveRecord Observers - RORLab Season 3-6
seapy
0
49
ActiveRecord Callbacks - RORLab Season 3-5
seapy
0
49
Rails Database Migrations - RORLab Season 3-3
seapy
2
100
Other Decks in Programming
See All in Programming
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
280
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
3
280
ドメインイベントでビジネスロジックを解きほぐす #phpcon_odawara
kajitack
3
780
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
140
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
340
[RubyKaigi 2026] Require Hooks
palkan
1
200
NakouPAY説明用
annouim0
0
120
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
250
10年分の技術的負債、完済へ ― Claude Code主導のAI駆動開発でスポーツブルを丸ごとリプレイスした話
takuya_houshima
0
2.6k
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
560
AI-DLC Deep Dive
yuukiyo
9
4.2k
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
500
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
9.8k
RailsConf 2023
tenderlove
30
1.4k
Statistics for Hackers
jakevdp
799
230k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
My Coaching Mixtape
mlcsv
0
100
The Spectacular Lies of Maps
axbom
PRO
1
700
GitHub's CSS Performance
jonrohan
1032
470k
Prompt Engineering for Job Search
mfonobong
0
270
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
190
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
260
Mind Mapping
helmedeiros
PRO
1
150
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
감사합니다.