Przeglądaj źródła

model add scope

abiao 4 lat temu
rodzic
commit
dfdeacf966
1 zmienionych plików z 1 dodań i 1 usunięć
  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 
             #return ((rate*100).round.to_f/100).to_s + "%"
-            return bindings[:object].current_admin_user.email
+            return bindings[:view].current_admin_user.email
     end
 
     rails_admin do