abiao лет назад: 4
Родитель
Сommit
e67e90cda2
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      app/models/product.rb

+ 2 - 4
app/models/product.rb

@@ -131,11 +131,9 @@ class Product < ActiveRecord::Base
         weight -240
         weight -240
 
 
         list do
         list do
-            def current_user
-                @current_user ||= AdminUser.find_by(id: session[:user_id])
-            end
 
 
-            if current_user.id==1
+
+            if current_admin_user.id==1
                 scopes [:inactive]
                 scopes [:inactive]
             end
             end