Revert "Do not show deleted products in order cycle admin"

This reverts commit 4e45a682fd.
This commit is contained in:
Rohan Mitchell
2014-06-03 12:18:27 +10:00
parent d4f65a63bb
commit d52c1fa5da
3 changed files with 8 additions and 28 deletions

View File

@@ -1,10 +0,0 @@
object @product
attributes :name
node(:supplier_name) { |p| p.supplier.andand.name }
node(:image_url) { |p| p.images.present? ? p.images.first.attachment.url(:mini) : nil }
node(:master_id) { |p| p.master.id }
child variants: :variants do |variant|
attributes :id
node(:label) { |v| v.options_text }
end

View File

@@ -2,8 +2,13 @@ collection @collection
attributes :id, :name
node(:supplied_products) do |enterprise|
enterprise.supplied_products.not_deleted.map do |product|
partial 'admin/enterprises/supplied_product', object: product
child supplied_products: :supplied_products do |product|
attributes :name
node(:supplier_name) { |p| p.supplier.andand.name }
node(:image_url) { |p| p.images.present? ? p.images.first.attachment.url(:mini) : nil }
node(:master_id) { |p| p.master.id }
child variants: :variants do |variant|
attributes :id
node(:label) { |v| v.options_text }
end
end