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 Observers - RORLab Season 3-6
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
seapy
May 11, 2013
Programming
54
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
490
Amazon ec2 container service 소개
seapy
0
96
boot2docker 사용시 컨테이너에서 생성한 데이터를 유지하기
seapy
0
89
Elasticsearch + fluentd for Log analysis
seapy
3
10k
ActiveRecord Associations(2) - RORLab Season 3-8
seapy
0
53
ActiveRecord Associations(1) - RORLab Season 3-7
seapy
0
74
ActiveRecord Callbacks - RORLab Season 3-5
seapy
0
54
Rails Database Migrations - RORLab Season 3-3
seapy
2
110
Other Decks in Programming
See All in Programming
R8 の設定見直しでアプリサイズ削減
andpad
0
220
golang-bob.pdf
iwatsukayura
0
130
パスワード再設定メールのURLについて知っておこう
uyuki234
0
160
すこし踏み込む CancellationToken
htkym
2
1.7k
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
160
JIS keyboard support in Omarchy
lef237
0
120
Agents on Rails - Rails at Scale 2026
irinanazarova
0
560
ActionController meets Protocol Buffers
sorah
0
550
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.9k
Kotlinの15年とServer-Side Kotlin
n_takehata
1
150
APNsからLive Activityを開始する話
yumnumm
0
170
AWSに止められる覚悟してますか?
morizo_1984
2
540
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
340
58k
The agentic SEO stack - context over prompts
schlessera
0
970
Odyssey Design
rkendrick25
PRO
2
870
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
67k
RailsConf 2023
tenderlove
30
1.6k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
730
Building Applications with DynamoDB
mza
96
7.2k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
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
감사합니다.