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

+ 4 - 3
app/models/product.rb

@@ -119,7 +119,8 @@ 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 + "%"
+            #return ((rate*100).round.to_f/100).to_s + "%"
+        return  current_admin_user.email
     end
 
     rails_admin do 
@@ -127,7 +128,7 @@ class Product < ActiveRecord::Base
         weight -240
 
         list do
-            puts  {current_admin_user.email}
+
             scopes [:inactive]
 
             filters [:id,:detail,:status,:name]
@@ -156,7 +157,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