diff --git a/Gemfile b/Gemfile index 018be1d4e..ccfc7633c 100644 --- a/Gemfile +++ b/Gemfile @@ -91,6 +91,8 @@ group :test do gem "rails-dom-testing" gem "mocha" gem "simplecov", "~> 0.9.1", :require => false + # TODO: remove this after upgrading to Rails 5 + gem "test_after_commit" # For running UI tests gem "capybara" gem "selenium-webdriver", "~> 2.53.4" diff --git a/app/models/journal.rb b/app/models/journal.rb index 7d1a6eb34..369666b6f 100644 --- a/app/models/journal.rb +++ b/app/models/journal.rb @@ -43,7 +43,7 @@ class Journal < ActiveRecord::Base " (#{JournalDetail.table_name}.prop_key = 'status_id' OR #{Journal.table_name}.notes <> '')").distinct before_create :split_private_notes - after_create :send_notification + after_commit :send_notification, :on => :create scope :visible, lambda {|*args| user = args.shift || User.current diff --git a/app/views/mailer/issue_edit.html.erb b/app/views/mailer/issue_edit.html.erb index d84f44923..b7fc18ed6 100644 --- a/app/views/mailer/issue_edit.html.erb +++ b/app/views/mailer/issue_edit.html.erb @@ -4,7 +4,7 @@ <%= l(:text_issue_updated, :id => link_to("##{@issue.id}", @issue_url), :author => h(@journal.user)).html_safe %>
-