Skip to content

Commit be89d3b

Browse files
committed
1.3.0: in_transaction helper method
1 parent 00554bf commit be89d3b

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## 1.3.0 (2022-10-28)
8+
9+
### Added
10+
11+
- `in_transaction` helper method to execute code within existing transaction or start a new one if there is no tx open.
12+
13+
It is similar to `ActiveRecord::Base.transaction`, but it doesn't swallow `ActiveRecord::Rollback` exception in case when there is no transaction open.
14+
15+
See discussion at [#23](https://github.com/Envek/after_commit_everywhere/pull/23) for details.
16+
17+
[Pull request #23](https://github.com/Envek/after_commit_everywhere/pull/23) by [@jpcamara][].
18+
19+
- Ability to call `in_transaction` helper with the same arguments as [`ActiveRecord::Base.transaction`](https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements.html#method-i-transaction). [@Envek][].
20+
721
## 1.2.2 (2022-06-20)
822

923
### Fixed
@@ -99,3 +113,4 @@ See [#11](https://github.com/Envek/after_commit_everywhere/issues/11) for discus
99113
[@joevandyk]: https://github.com/joevandyk "Joe Van Dyk"
100114
[@stokarenko]: https://github.com/stokarenko "Sergey Tokarenko"
101115
[@lolripgg]: https://github.com/lolripgg "James Brewer"
116+
[@jpcamara]: https://github.com/jpcamara "JP Camara"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module AfterCommitEverywhere
4-
VERSION = "1.2.2"
4+
VERSION = "1.3.0"
55
end

0 commit comments

Comments
 (0)