Browse Source

model add scope

abiao 4 years ago
parent
commit
2781c186ba
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/models/product.rb

+ 1 - 1
app/models/product.rb

@@ -133,7 +133,7 @@ class Product < ActiveRecord::Base
         list do
 
 
-            if @admin_user.id==1
+            if Devise.current_admin_user.id==1
                 scopes [:inactive]
             end