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.

Expose `model_class` as a helper method for all controllers inheriting from `Admin::ResourceController`

Damian Legawiececfb293b2745
diff --git a/admin/app/controllers/spree/admin/resource_controller.rb b/admin/app/controllers/spree/admin/resource_controller.rb
index 5fe3ff946c..f7fb75dd1f 100644
--- a/admin/app/controllers/spree/admin/resource_controller.rb
+++ b/admin/app/controllers/spree/admin/resource_controller.rb
@@ -1,7 +1,7 @@
class Spree::Admin::ResourceController < Spree::Admin::BaseController
include Spree::Admin::Callbacks
- helper_method :new_object_url, :edit_object_url, :object_url, :collection_url
+ helper_method :new_object_url, :edit_object_url, :object_url, :collection_url, :model_class
before_action :load_resource
before_action :set_currency, :set_current_store, only: [:new, :create]