Spree::Store.class_eval do
  has_one :braintree_configuration, class_name: "SolidusPaypalBraintree::Configuration"

  before_create :build_default_configuration

  private

  def build_default_configuration
    build_braintree_configuration
  end
end

Spree::Store.class_eval do
  has_one :braintree_configuration, class_name: "SolidusPaypalBraintree::Configuration", dependent: :destroy

  before_create :build_default_configuration

  private

  def build_default_configuration
    build_braintree_configuration
  end
end

Add dependent :destroy to configuration association
Add dependent :destroy to configuration association

Since configurations are tied to the store, it doesn't make sense to
keep them around if the store is deleted.
