]> source.dussan.org Git - redmine.git/commit
Added observers to watch model objects for mail delivery instead of calling Mailer.
authorEric Davis <edavis@littlestreamsoftware.com>
Sat, 28 Mar 2009 00:38:57 +0000 (00:38 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Sat, 28 Mar 2009 00:38:57 +0000 (00:38 +0000)
commitb4be8849c0de81841c458c0f059787a9cc9bc022
tree2db816db1cb3cf2fd0761f1e3ad0bc1373f9f12e
parent3557e767e0b0c1e9fd7f97414a92f3d9dc00d98e
Added observers to watch model objects for mail delivery instead of calling Mailer.

* Added an IssueObserver to watch when Issues are created
* Added a JournalObserver to watch when Journals are created (Issue updates)
* Added a NewsObserver for News items.
* Added a DocumentObserver for Document notifications.
* Setup IssuesController#new to use the IssueObserver.
* Setup IssuesController#edit to use the IssueObserver.
* Setup IssuesController#bulk_edit to use the JournalObserver.
* Removed the Mailer call in Changeset#scan_commit_for_issue_ids, the
  JournalObserver will handle it.
* Removed Mailer calls in MailHandler in favor of the Observers.

  #2659

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2637 e93f8b46-1217-0410-a6f0-8f06a7374b81
19 files changed:
app/controllers/documents_controller.rb
app/controllers/issues_controller.rb
app/controllers/news_controller.rb
app/models/changeset.rb
app/models/document_observer.rb [new file with mode: 0644]
app/models/issue_observer.rb [new file with mode: 0644]
app/models/journal_observer.rb [new file with mode: 0644]
app/models/mail_handler.rb
app/models/news_observer.rb [new file with mode: 0644]
config/environment.rb
test/functional/documents_controller_test.rb
test/functional/issues_controller_test.rb
test/functional/news_controller_test.rb
test/unit/changeset_test.rb
test/unit/document_test.rb
test/unit/issue_test.rb
test/unit/journal_test.rb
test/unit/mail_handler_test.rb
test/unit/news_test.rb