Fix journal_observer
This commit is contained in:
parent
1a2aa363bd
commit
9bb45d9e75
|
@ -824,17 +824,6 @@ class Issue < ActiveRecord::Base
|
|||
end
|
||||
|
||||
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
|
||||
def new_status
|
||||
if details.keys.include? 'status_id'
|
||||
|
|
|
@ -36,7 +36,7 @@ Rails::Initializer.run do |config|
|
|||
|
||||
# Activate observers that should always be running
|
||||
# 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
|
||||
# config.active_record.default_timezone = :utc
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 502993c2b767945a3d931acba4fbb1466db388c4
|
||||
Subproject commit 62d308af1ea818c52145bf15a6f0d246c41bd127
|
Loading…
Reference in New Issue