Fix journal_observer

This commit is contained in:
Tim Felgentreff 2010-10-27 11:53:20 +02:00
parent 1a2aa363bd
commit 9bb45d9e75
3 changed files with 2 additions and 13 deletions

View File

@ -824,17 +824,6 @@ class Issue < ActiveRecord::Base
end end
IssueJournal.class_eval do IssueJournal.class_eval do
after_create :notify_of_updates
def notify_of_updates
return if self.version == 1
if Setting.notified_events.include?('issue_updated')
Mailer.deliver_issue_edit(self)
elsif Setting.notified_events.include?('issue_note_added') and !self.notes.blank?
Mailer.deliver_issue_edit(self)
end
end
# Shortcut # Shortcut
def new_status def new_status
if details.keys.include? 'status_id' if details.keys.include? 'status_id'

View File

@ -36,7 +36,7 @@ Rails::Initializer.run do |config|
# Activate observers that should always be running # Activate observers that should always be running
# config.active_record.observers = :cacher, :garbage_collector # config.active_record.observers = :cacher, :garbage_collector
config.active_record.observers = :message_observer, :issue_observer, :news_observer, :document_observer, :wiki_content_observer config.active_record.observers = :journal_observer, :message_observer, :issue_observer, :news_observer, :document_observer, :wiki_content_observer
# Make Active Record use UTC-base instead of local time # Make Active Record use UTC-base instead of local time
# config.active_record.default_timezone = :utc # config.active_record.default_timezone = :utc

@ -1 +1 @@
Subproject commit 502993c2b767945a3d931acba4fbb1466db388c4 Subproject commit 62d308af1ea818c52145bf15a6f0d246c41bd127