Bring base files from spree_core

This commit is contained in:
Luis Ramos
2020-08-19 03:50:10 +01:00
parent c56962b949
commit 7ec00cf40a
3 changed files with 355 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
module Spree
class LogEntry < ActiveRecord::Base
belongs_to :source, polymorphic: true
# Fix for #1767
# If a payment fails, we want to make sure we keep the record of it failing
after_rollback :save_anyway
def save_anyway
log = Spree::LogEntry.new
log.source = source
log.details = details
log.save!
end
end
end