Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Update code
Matthew Kennedyb414974644d5
diff --git a/backend/app/views/spree/admin/menus/nested_menu_items/_item_bar.html.erb b/backend/app/views/spree/admin/menus/nested_menu_items/_item_bar.html.erbindex 0bdbc4aec1..45382e8ea0 100644--- a/backend/app/views/spree/admin/menus/nested_menu_items/_item_bar.html.erb+++ b/backend/app/views/spree/admin/menus/nested_menu_items/_item_bar.html.erb@@ -14,7 +14,7 @@<%= "| #{Spree.t('admin.navigation.code')}: #{item.code}" if item.code.present? %></small></div>- <% if item.uses_attached_image %>+ <% if item.has_attached_image %><% if item.image_asset.attached? && item.image_asset.image? %><div class="ml-2"><div class="menu_items_image_holder">diff --git a/core/app/models/spree/menu_item.rb b/core/app/models/spree/menu_item.rbindex 6e1ba4bbb0..f55c50669d 100644--- a/core/app/models/spree/menu_item.rb+++ b/core/app/models/spree/menu_item.rb@@ -26,7 +26,7 @@ module Spreevalidates :linked_resource_type, inclusion: { in: LINKED_RESOURCE_TYPE }def self.refresh_paths(resorce, old_value)- where(linked_resource_type: resorce.class.name).where('path LIKE ?', "%/#{old_value}%").each(&:save!)+ where(linked_resource_type: resorce.class.name, linked_resource_id: resorce.id).each(&:save!)endprivate@@ -53,7 +53,7 @@ module Spreeenddef check_for_image- self.uses_attached_image = if image_asset.attached?+ self.has_attached_image = if image_asset.attached?trueelsefalsediff --git a/frontend/app/views/spree/shared/_main_nav_bar.html.erb b/frontend/app/views/spree/shared/_main_nav_bar.html.erbindex 842ecdecbf..4fb39def2a 100644--- a/frontend/app/views/spree/shared/_main_nav_bar.html.erb+++ b/frontend/app/views/spree/shared/_main_nav_bar.html.erb@@ -42,7 +42,7 @@<% child.children.each do |promo_banner| %><%= link_to menu_item_link_to(promo_banner), class: "dropdown-item" do %><div class="category-image text-center my-4 mx-3">- <% if promo_banner.uses_attached_image %>+ <% if promo_banner.has_attached_image %><%= image_tag main_app.url_for(promo_banner.image_asset), title: promo_banner.subtitle %><% end %><div class="category-box">