Enable Rails 5 behavior for exceptions in after_commit callbacks

This commit is contained in:
Jonne Haß 2014-12-28 20:36:51 +01:00
parent 9ad2409264
commit 162303db37
2 changed files with 4 additions and 1 deletions

View file

@ -18,7 +18,7 @@ class Reshare < Post
end
after_commit :on => :create do
self.root.update_reshares_counter
self.root.update_reshares_counter if self.root.present?
end
after_destroy do

View file

@ -89,5 +89,8 @@ module Diaspora
g.template_engine :haml
g.test_framework :rspec
end
# Will be default with Rails 5
config.active_record.raise_in_transactional_callbacks = true
end
end