0
我使用我的应用程序的轨道3,在我需要使用名为范围PROC,但它不工作形成我如何使用PROC名为范围
scope :donate_list,Proc.new {|nonprofit,event| where("zip IN (?) AND category_id IN (?)",nonprofit,event)}
其中其得到错误
我使用我的应用程序的轨道3,在我需要使用名为范围PROC,但它不工作形成我如何使用PROC名为范围
scope :donate_list,Proc.new {|nonprofit,event| where("zip IN (?) AND category_id IN (?)",nonprofit,event)}
其中其得到错误
尝试用拉姆达:
scope :donate_list, lambda {|nonprofit,event| where("zip IN (?) AND category_id IN (?)",nonprofit,event)}
它为我的工作,有什么做日志说? – hellvinz 2010-09-15 15:11:59