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 Observers - RORLab Season 3-6
Search
seapy
May 11, 2013
Programming
50
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ActiveRecord Observers - RORLab Season 3-6
seapy
May 11, 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
93
boot2docker 사용시 컨테이너에서 생성한 데이터를 유지하기
seapy
0
86
Elasticsearch + fluentd for Log analysis
seapy
3
10k
ActiveRecord Associations(2) - RORLab Season 3-8
seapy
0
52
ActiveRecord Associations(1) - RORLab Season 3-7
seapy
0
73
ActiveRecord Callbacks - RORLab Season 3-5
seapy
0
50
Rails Database Migrations - RORLab Season 3-3
seapy
2
110
Other Decks in Programming
See All in Programming
Performance Engineering for Everyone
elenatanasoiu
0
270
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
360
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
230
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
170
【やさしく解説 設計編・中級 #4】ルールの寿命と、システムの年輪
panda728
PRO
2
130
1B+ /day規模のログを管理する技術
broadleaf
0
140
Creating Composable Callables in Contemporary C++
rollbear
0
210
1年で人数1.5倍、PR数5.5倍増。 品質とアウトカムはどうなったか、 何が効いたか
ike002jp
0
130
技術記事、 専門家としてのプログラマ、 言語化
mizchi
14
7.5k
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
230
フィードバックで育てるAI開発
kotaminato
1
120
The Bowling Game- From Imperative to Functional Programming - Part 1
philipschwarz
PRO
0
320
Featured
See All Featured
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
360
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.6k
Speed Design
sergeychernyshev
33
1.9k
Building the Perfect Custom Keyboard
takai
2
810
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
1k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Transcript
Active Record Observers Ror lab. season 3 - the 6th
round - May 11, 2013 ChangHoon Jeong(@seapy)
Contents • The Object Life Cycle • Validations Overview •
Validation Helpers • Common Validation Options • Conditional Validation • Custom Validations • Working with Validation Errors • Displaying Validation Errors in the View • Callbacks Overview • Available Callbacks • Running Callbacks • Skipping Callbacks • Halting Execution • Relational Callbacks • Conditional Callbacks • Callback Classes • Observers • Transaction Callbacks Validations Callbacks
Callback Classes • To reuse callback methods for other models
as an instance method a model object instance method
Callback Classes as a class method
Observers • Similar to callbacks • for the callbacks with
the code that isn’t directly related the model • without changing the code of the model • ex. sending confirmation email after user registration
Creating Observers
Registering Observers • config/application.rb • or config/environments
Sharing Observers as a model name
Transaction Callbacks • after_commit or after_rollback
감사합니다.