Skip to content

Commit

Permalink
remove conditional that is always true
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Feb 1, 2015
1 parent f958ec1 commit e87ff50
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions activerecord/lib/active_record/transactions.rb
Expand Up @@ -318,9 +318,8 @@ def rolledback!(force_restore_state: false, should_run_callbacks: true) #:nodoc:
# Add the record to the current transaction so that the +after_rollback+ and +after_commit+ callbacks
# can be called.
def add_to_transaction
if self.class.connection.add_transaction_record(self)
remember_transaction_record_state
end
self.class.connection.add_transaction_record(self)
remember_transaction_record_state
end

# Executes +method+ within a transaction and captures its return value as a
Expand Down

0 comments on commit e87ff50

Please sign in to comment.