소스 검색

model add scope

abiao 5 년 전
부모
커밋
7511ea4bea
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/models/product.rb

+ 1 - 1
app/models/product.rb

@@ -123,7 +123,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 + "%"
-            user= admin_user
+            user= session_path(resource_name)
         return user
     end