Created
May 2, 2012 17:13
-
-
Save mixonic/2578362 to your computer and use it in GitHub Desktop.
This file contains 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 Task | |
after_save :nofity_for_next_tasks | |
def notify! | |
unless user_notified? # This is a new column | |
send_actual_email_somehow(task, user) | |
update_attribute(:user_notified, true) | |
end | |
end | |
private | |
def notify_for_next_tasks | |
candidate.nofity_for_next_tasks | |
end | |
end | |
class Candidate | |
def notify_for_next_tasks | |
current_stage = find_current_stage_somehow | |
current_stage.tasks.each do |task| | |
task.notify! | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment