Created
November 3, 2009 16:01
-
-
Save edavis10/225147 to your computer and use it in GitHub Desktop.
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 JournalObserver < ActiveRecord::Observer | |
def after_create(journal) | |
if Setting.notified_events.include?('issue_updated') || | |
(Setting.notified_events.include?('issue_note_added') && journal.notes.present?) || | |
(Setting.notified_events.include?('issue_status_updated') && journal.new_status.present?) || | |
(Setting.notified_events.include?('issue_priority_updated') && journal.new_value_for('priority_id').present?) | |
Mailer.deliver_issue_edit(journal) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment