Skip to content

Commit

Permalink
Remove after_rollback from LogEntry
Browse files Browse the repository at this point in the history
  • Loading branch information
jhawthorn committed Oct 11, 2017
1 parent e83c58e commit 4aaeb35
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions core/app/models/spree/log_entry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@ module Spree
class LogEntry < Spree::Base
belongs_to :source, polymorphic: true

# Fix for https://github.com/spree/spree/issues/1767
# If a payment fails, we want to make sure we keep the record of it failing
after_rollback :save_anyway, if: proc { !Rails.env.test? }

def save_anyway
log = Spree::LogEntry.new
log.source = source
log.details = details
log.save!
end

def parsed_details
@details ||= YAML.load(details)
end
Expand Down

0 comments on commit 4aaeb35

Please sign in to comment.