ソースを参照

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