Skip to content

Commit

Permalink
Update version references in backend_configuration.rb for Solidus 4…
Browse files Browse the repository at this point in the history
….2.0

The `backend_configuration.rb` file had preferences still pointing to
`Solidus v4.1.0.a`.

This commit updates the references to `Solidus v4.2` to ensure the correct
versioned preferences are loaded.
  • Loading branch information
rainerdema committed Oct 2, 2023
1 parent 51f44e1 commit ff09c3f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions backend/lib/spree/backend_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class BackendConfiguration < Preferences::Configuration

# @!attribute [rw] theme
# @return [String] Default admin theme name
versioned_preference :theme, :string, initial_value: 'classic', boundaries: { "4.1.0.a" => "solidus_admin" }
versioned_preference :theme, :string, initial_value: 'classic', boundaries: { "4.2.0" => "solidus_admin" }

def theme_path(user_theme = nil)
user_theme ? themes.fetch(user_theme.to_sym) : themes.fetch(theme.to_sym)
Expand All @@ -25,8 +25,7 @@ def theme_path(user_theme = nil)
# @!attribute [rw] admin_updated_navbar
# @return [Boolean] Should the updated navbar be used in admin (default: +false+)
#
# TODO: Update boundaries before merging to `main`
versioned_preference :admin_updated_navbar, :boolean, initial_value: false, boundaries: { "4.1.0.a" => true }
versioned_preference :admin_updated_navbar, :boolean, initial_value: false, boundaries: { "4.2.0" => true }

preference :frontend_product_path,
:proc,
Expand All @@ -40,7 +39,7 @@ def theme_path(user_theme = nil)

# @!attribute [rw] prefer_menu_item_partials
# @return [Boolean] Whether or not to prefer menu item partials when both a partial and children are present.
preference :prefer_menu_item_partials, :boolean, default: false
versioned_preference :prefer_menu_item_partials, :boolean, initial_value: true, boundaries: { "4.2.0" => false }

autoload :ORDER_TABS, 'spree/backend_configuration/deprecated_tab_constants'
autoload :PRODUCT_TABS, 'spree/backend_configuration/deprecated_tab_constants'
Expand Down

0 comments on commit ff09c3f

Please sign in to comment.