Browse Source

增加复制商品功能

abiao 5 years ago
parent
commit
e2707e0cf7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/models/product.rb

+ 1 - 1
app/models/product.rb

@@ -30,7 +30,7 @@ class Product < ActiveRecord::Base
         pictures = ProductPicture.find_by_sql("select * from product_pictures where pic_type=0 and product_id = #{self.id}")
         # 创建商品图片
         pictures.each do |u|
-            u.remove
+            u.delete
         end
     end