Parcourir la source

model add scope

abiao il y a 4 ans
Parent
commit
8f886dccef
1 fichiers modifiés avec 5 ajouts et 3 suppressions
  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