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
Extract Rabl configuration into initializer
Damian Legawiecb0f8eba42684
diff --git a/api/config/initializers/rabl.rb b/api/config/initializers/rabl.rbnew file mode 100644index 0000000000..85a562e386--- /dev/null+++ b/api/config/initializers/rabl.rb@@ -0,0 +1,9 @@+Rabl.configure do |config|+ config.include_json_root = false+ config.include_child_root = false++ # Motivation here it make it call as_json when rendering timestamps+ # and therefore display miliseconds. Otherwise it would fall to+ # JSON.dump which doesn't display the miliseconds+ config.json_engine = ActiveSupport::JSON+enddiff --git a/api/lib/spree/api/engine.rb b/api/lib/spree/api/engine.rbindex 66a9c49cee..acdff20b44 100644--- a/api/lib/spree/api/engine.rb+++ b/api/lib/spree/api/engine.rb@@ -6,16 +6,6 @@ module Spreeisolate_namespace Spreeengine_name 'spree_api'- Rabl.configure do |config|- config.include_json_root = false- config.include_child_root = false-- # Motivation here it make it call as_json when rendering timestamps- # and therefore display miliseconds. Otherwise it would fall to- # JSON.dump which doesn't display the miliseconds- config.json_engine = ActiveSupport::JSON- end-# sets the manifests / assets to be precompiled, even when initialize_on_precompile is falseinitializer 'spree.assets.precompile', group: :all do |app|app.config.assets.precompile += %w[