Enable Rails 5 behavior for exceptions in after_commit callbacks
This commit is contained in:
parent
9ad2409264
commit
162303db37
2 changed files with 4 additions and 1 deletions
|
|
@ -18,7 +18,7 @@ class Reshare < Post
|
||||||
end
|
end
|
||||||
|
|
||||||
after_commit :on => :create do
|
after_commit :on => :create do
|
||||||
self.root.update_reshares_counter
|
self.root.update_reshares_counter if self.root.present?
|
||||||
end
|
end
|
||||||
|
|
||||||
after_destroy do
|
after_destroy do
|
||||||
|
|
|
||||||
|
|
@ -89,5 +89,8 @@ module Diaspora
|
||||||
g.template_engine :haml
|
g.template_engine :haml
|
||||||
g.test_framework :rspec
|
g.test_framework :rspec
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Will be default with Rails 5
|
||||||
|
config.active_record.raise_in_transactional_callbacks = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue