Skip to content

armgit / spree

Public Imported from GitHub
0

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.

Remove not needed friendly id patch

Damian Legawiec1e4593c3b023
diff --git a/core/lib/friendly_id/slug_rails5_patch.rb b/core/lib/friendly_id/slug_rails5_patch.rb
deleted file mode 100644
index 1bb4c7c330..0000000000
--- a/core/lib/friendly_id/slug_rails5_patch.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-# Temporary fix to FriendlyId in Rails5, so that we don't
-# encounter any validation errors when creating slugs via
-# FriendlyId::History on a paranoid model.
-# See: https://github.com/norman/friendly_id/issues/822
-if Rails::VERSION::STRING >= '5.0'
- module FriendlyId
- class Slug < ActiveRecord::Base
- belongs_to :sluggable, polymorphic: true, optional: true
- end
- end
-end
diff --git a/core/lib/spree_core.rb b/core/lib/spree_core.rb
index e0b0a6176c..67b28d4932 100644
--- a/core/lib/spree_core.rb
+++ b/core/lib/spree_core.rb
@@ -1,2 +1 @@
-require 'friendly_id/slug_rails5_patch'
require 'spree/core'