Skip to content

Commit

Permalink
Remove class_eval on Spree::Gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt-Yorkley committed Jul 24, 2021
1 parent 0764484 commit 38aac70
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
1 change: 1 addition & 0 deletions app/models/spree/gateway.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

module Spree
class Gateway < PaymentMethod
acts_as_taggable
include PaymentMethodDistributors

delegate_belongs_to :provider, :authorize, :purchase, :capture, :void, :credit
Expand Down
9 changes: 0 additions & 9 deletions config/initializers/spree.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@

require 'spree/core'

# Due to a bug in ActiveRecord we need to load the tagging code in Gateway which
# should have inherited it from its parent PaymentMethod.
# We have to call it before loading the PaymentMethod decorator because the
# tagging code won't load twice within the inheritance chain.
# https://github.com/openfoodfoundation/openfoodnetwork/issues/3121
Spree::Gateway.class_eval do
acts_as_taggable
end

Spree.config do |config|
config.site_url = ENV['SITE_URL'] if ENV['SITE_URL']
config.site_name = ENV['SITE_NAME'] if ENV['SITE_NAME']
Expand Down

0 comments on commit 38aac70

Please sign in to comment.