abiao před 4 roky
rodič
revize
526f83c3b3
1 změnil soubory, kde provedl 5 přidání a 6 odebrání
  1. 5 6
      app/models/product.rb

+ 5 - 6
app/models/product.rb

@@ -121,7 +121,9 @@ class Product < ActiveRecord::Base
         if self.buy_price != 0 && self.price != 0
             rate = (( self.price.to_f - self.buy_price.to_f )/self.buy_price.to_f)*100
         end
-        return ((rate*100).round.to_f/100).to_s + "%"
+        value = bindings[:view].current_admin_user.id
+            #return ((rate*100).round.to_f/100).to_s + "%"
+        return value
     end
 
     rails_admin do 
@@ -138,10 +140,7 @@ class Product < ActiveRecord::Base
                     strs=formatted_value{bindings[:view].current_admin_user.email}
                 end
             end
-
-            # puts strs
-            debug(strs)
-
+            puts strs
 
             filters [:id,:detail,:status,:name]
 
@@ -169,7 +168,7 @@ class Product < ActiveRecord::Base
             #field :robo_balance_price
             field :user_sale_price
             # field :buy_price
-            #field :gross_interest_rate
+            field :gross_interest_rate
             field :count
             field :recommend
             field :status