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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
seapy
May 11, 2013
Programming
51
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
94
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
50
Rails Database Migrations - RORLab Season 3-3
seapy
2
110
Other Decks in Programming
See All in Programming
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
150
Cloudflare is Agents
chimame
0
150
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
240
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
460
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
160
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
760
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
300
Android CLI
fornewid
0
210
【やさしく解説 設計編・中級 #4】ルールの寿命と、システムの年輪
panda728
PRO
2
180
the container ship “Apple Silicon”@WWDC26 Recap -Japan-\(region).swift
shingangan
0
110
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
5
1.4k
プロポーザルを書いてもらう
pvcresin
0
290
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
200
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
440
KATA
mclloyd
PRO
35
15k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Deep Space Network (abreviated)
tonyrice
0
250
Paper Plane (Part 1)
katiecoart
PRO
1
10k
30 Presentation Tips
portentint
PRO
1
360
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
감사합니다.