希望根据 Rails 2.0.2 中的条件限制查找。
查找语句:
@employees = Employee.find_by_contents(params[:keywords].to_s, :include => [ :categories, :revisions, :approvals, :archives, :related_documents ])
需要添加条件限制查找
:conditions=>["archived = '0'"]
虽然这不起作用
@employees = Employee.find_by_contents(params[:keywords].to_s, :include => [ :categories, :revisions, :approvals, :archives, :related_documents ], :conditions=>["archived = '0'"])
任何人都知道语法应该是什么?