mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Remove unused preference default_country_id
This commit is contained in:
@@ -37,7 +37,6 @@ module Spree
|
||||
preference :currency_symbol_position, :string, default: "before"
|
||||
preference :currency_thousands_separator, :string, default: ","
|
||||
preference :display_currency, :boolean, default: false
|
||||
preference :default_country_id, :integer
|
||||
preference :default_meta_description, :string, default: 'OFN demo site'
|
||||
preference :default_meta_keywords, :string, default: 'ofn, demo'
|
||||
preference :default_seo_title, :string, default: ''
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class DeleteDefaultCountryIdPreference < ActiveRecord::Migration[7.0]
|
||||
def up
|
||||
execute <<~SQL.squish
|
||||
DELETE FROM spree_preferences
|
||||
WHERE key = '/spree/app_configuration/default_country_id '
|
||||
SQL
|
||||
end
|
||||
end
|
||||
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.0].define(version: 2025_01_13_055412) do
|
||||
ActiveRecord::Schema[7.0].define(version: 2025_01_28_031518) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_stat_statements"
|
||||
enable_extension "plpgsql"
|
||||
|
||||
@@ -234,12 +234,10 @@ RSpec.configure do |config|
|
||||
end
|
||||
end
|
||||
|
||||
default_country_id = DefaultCountry.id
|
||||
# Ensure we start with consistent config settings
|
||||
config.before(:each) do
|
||||
reset_spree_preferences do |spree_config|
|
||||
# These are all settings that differ from Spree's defaults
|
||||
spree_config.default_country_id = default_country_id
|
||||
spree_config.shipping_instructions = true
|
||||
end
|
||||
CurrentConfig.clear_all
|
||||
|
||||
@@ -22,8 +22,3 @@ if Spree::Country.where(name: "France").empty?
|
||||
Spree::State.create!({ "name" => "Alsace", "abbr" => "Als", :country => country })
|
||||
Spree::State.create!({ "name" => "Aquitaine", "abbr" => "Aq", :country => country })
|
||||
end
|
||||
|
||||
# Since the country seeding differs from other environments, the default
|
||||
# country id has to be updated here. This line can be removed as soon as the
|
||||
# default country id is replaced by something database independent.
|
||||
Spree::Config.default_country_id = Spree::Country.find_by(name: 'Australia').id
|
||||
|
||||
Reference in New Issue
Block a user