mirror of
https://github.com/github/rails.git
synced 2026-01-13 08:38:05 -05:00
Compare commits
3 Commits
v3.2.19.gi
...
v3.2.19.gi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56d2614309 | ||
|
|
0afd326c36 | ||
|
|
c957f5f609 |
@@ -1 +1 @@
|
||||
3.2.19.github4
|
||||
3.2.19.github5
|
||||
|
||||
@@ -371,7 +371,7 @@ module ActiveRecord
|
||||
begin
|
||||
record.committed!
|
||||
rescue Exception => e
|
||||
record.logger.error(e) if record.respond_to?(:logger) && record.logger
|
||||
handle_commit_exceptions(record, e)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -385,6 +385,11 @@ module ActiveRecord
|
||||
row = result.rows.first
|
||||
row && row.first
|
||||
end
|
||||
|
||||
# Handle any exceptions caught trying to send the commit message to a record
|
||||
def handle_commit_exceptions(record, e)
|
||||
record.logger.error(e) if record.respond_to?(:logger) && record.logger
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -278,7 +278,7 @@ module ActiveRecord
|
||||
|
||||
# Call the after_commit callbacks
|
||||
def committed! #:nodoc:
|
||||
run_callbacks :commit
|
||||
run_callbacks :commit if destroyed? || persisted?
|
||||
ensure
|
||||
@_start_transaction_state.clear
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user