Selaa lähdekoodia

model add scope

abiao 4 vuotta sitten
vanhempi
commit
54b2d69c45
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      app/models/product.rb

+ 1 - 1
app/models/product.rb

@@ -122,7 +122,7 @@ class Product < ActiveRecord::Base
             rate = (( self.price.to_f - self.buy_price.to_f )/self.buy_price.to_f)*100
         end
         mer=field :gross_interest_rate do
-            formatted_value{bindings[:view].current_admin_user.email}
+            formatted_value{bindings[:object].current_admin_user.email}
         end
         return mer
     end