Search for digitals through variants

This commit is contained in:
Michael Gall
2011-12-08 11:20:39 +11:00
committed by future
parent 4ecf99a4ae
commit e1b4787988
2 changed files with 4 additions and 5 deletions

View File

@@ -2,11 +2,6 @@ module Spree
class Admin::DigitalsController < Spree::Admin::ResourceController
belongs_to "spree/product", find_by: :permalink
def load_resource
@object = @product = Product.find_by_permalink(params[:product_id])
end
protected
def location_after_save
admin_product_digitals_url(@product)

View File

@@ -0,0 +1,4 @@
Spree::Product.class_eval do
has_many :digitals, :through => :variants_including_master
end