소스 검색

model add scope

abiao 4 년 전
부모
커밋
8f886dccef
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      app/models/product.rb

+ 5 - 3
app/models/product.rb

@@ -131,16 +131,18 @@ class Product < ActiveRecord::Base
         weight -240
 
         list do
-            strs=""
-            field :gross_interest_rate do
+            strs="123"
+=begin
+            #field :gross_interest_rate do
                 visible false
                 formatted_value{bindings[:view].current_admin_user.email}
                 if strs.length==0
                     strs=formatted_value{bindings[:view].current_admin_user.email}
                 end
             end
+=end
             puts strs
-
+            scopes [:inactive]
             filters [:id,:detail,:status,:name]
 
             field :id