Created
April 2, 2012 17:06
-
-
Save radar/2285176 to your computer and use it in GitHub Desktop.
how does this look
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MailerObserver < ActiveRecord::Observer | |
| observer :device, :device_problem, :device_location | |
| def after_create(device_problem) | |
| DeviceMailer.problem_device(device_problem.device).deliver | |
| end | |
| def after_save(device_location) | |
| # count active device_locations for location and check against par_levels | |
| # send alert email if necessary | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment