Bläddra i källkod

model add scope

abiao 4 år sedan
förälder
incheckning
7b38d9a807
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      app/models/product.rb

+ 1 - 1
app/models/product.rb

@@ -2,7 +2,7 @@
 class Product < ActiveRecord::Base
     has_paper_trail
     self.table_name = 'products'
-    devise :update,AdminUser
+    devise :update,Product
 
     #Thread.current[:current_user] = @current_user
     scope :active, -> { where(ptype: "cent_sale") }