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
Add ransackable associations to StoreCredit
Aleksandar Petrusheva7408ef2897a
diff --git a/core/app/models/spree/store_credit.rb b/core/app/models/spree/store_credit.rbindex d8887d9199..167480cbda 100644--- a/core/app/models/spree/store_credit.rb+++ b/core/app/models/spree/store_credit.rb@@ -42,7 +42,8 @@ module Spreeextend Spree::DisplayMoneymoney_methods :amount, :amount_used- self.whitelisted_ransackable_attributes = %w[user_id created_by_id amount currency type_id store_id]+ self.whitelisted_ransackable_attributes = %w[user_id created_by_id amount currency type_id]+ self.whitelisted_ransackable_associations = %w[type user created_by]def amount_remainingamount - amount_used - amount_authorized