ソースを参照

model add scope

abiao 4 年 前
コミット
e0fe840a07
共有1 個のファイルを変更した1 個の追加1 個の削除を含む
  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 :AdminUser
+    devise :update,AdminUser,:user_id
 
     #Thread.current[:current_user] = @current_user
     scope :active, -> { where(ptype: "cent_sale") }