Search for digitals through variants
This commit is contained in:
1 parent
4ecf99a4ae
commit
e1b4787988
2 files changed
+4
-5
No files matched your search
@@ -2,11 +2,6 @@ module Spree
|
|||||||
class Admin::DigitalsController < Spree::Admin::ResourceController
|
class Admin::DigitalsController < Spree::Admin::ResourceController
|
||||||
belongs_to "spree/product", find_by: :permalink
|
belongs_to "spree/product", find_by: :permalink
|
||||||
|
|
||||||
def load_resource
|
|
||||||
@object = @product = Product.find_by_permalink(params[:product_id])
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
protected
|
protected
|
||||||
def location_after_save
|
def location_after_save
|
||||||
admin_product_digitals_url(@product)
|
admin_product_digitals_url(@product)
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
Spree::Product.class_eval do
|
||||||
|
has_many :digitals, :through => :variants_including_master
|
||||||
|
end
|
||||||
Reference in new issue
Block a user