Fix payment_method_decorator boot-time warning

Removes the annoying message "warning: already initialized constant
Spree::PaymentMethod::DISPLAY" that appears 4 times when booting the
app.

We are declaring said constant exactly as our Spree version does so
there's no point on repeating work.
This commit is contained in:
Pau Perez
2017-11-15 11:33:30 +01:00
parent ad25c1d1b2
commit f57661b13f

View File

@@ -1,8 +1,6 @@
Spree::PaymentMethod.class_eval do
include Spree::Core::CalculatedAdjustments
Spree::PaymentMethod::DISPLAY = [:both, :front_end, :back_end]
acts_as_taggable
has_and_belongs_to_many :distributors, join_table: 'distributors_payment_methods', :class_name => 'Enterprise', association_foreign_key: 'distributor_id'