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
seapy
May 11, 2013
Programming
53
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
95
boot2docker 사용시 컨테이너에서 생성한 데이터를 유지하기
seapy
0
88
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
51
Rails Database Migrations - RORLab Season 3-3
seapy
2
110
Other Decks in Programming
See All in Programming
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
700
MIZARU@SPAJAM2026 第二回予選
1901drama
0
110
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
220
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
300
XHTMLが残したもの
yosuke_furukawa
PRO
2
680
GKE アップグレード前に知っておきたい Blue/Green と PDB の関係
stkk
0
160
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.5k
業務時間外もAIに働いてもらう話
colorful12
3
10k
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
490
アクセシビリティから考える情報設計
high_g_engineer
0
350
Intent as Code
shoppingjaws
6
840
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
140
Featured
See All Featured
The untapped power of vector embeddings
frankvandijk
2
1.9k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
690
Mobile First: as difficult as doing things right
swwweet
225
10k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The SEO identity crisis: Don't let AI make you average
varn
0
550
Designing for Performance
lara
611
70k
Rails Girls Zürich Keynote
gr2m
96
14k
Faster Mobile Websites
deanohume
310
32k
Code Reviewing Like a Champion
maltzj
528
40k
Site-Speed That Sticks
csswizardry
13
1.5k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
510
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
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
감사합니다.