Ruby on rails 范围搜索“;“不支持查询”;
请购单\计划\机器\控制器Ruby on rails 范围搜索“;“不支持查询”;,ruby-on-rails,ruby,Ruby On Rails,Ruby,请购单\计划\机器\控制器 2015-01-14T19:52:56.805276+00:00 app[web.1]: ScopedSearch::QueryNotSupported (relation 'schedule_locations' not one of requisition_plan, machine, schedule_machines, schedule_locations, requisition_plan_products, products, product_catego
2015-01-14T19:52:56.805276+00:00 app[web.1]: ScopedSearch::QueryNotSupported (relation 'schedule_locations' not one of requisition_plan, machine, schedule_machines, schedule_locations, requisition_plan_products, products, product_categories ):
2015-01-14T19:52:56.805279+00:00 app[web.1]: app/controllers/api/v1/requisition_plan_machines_controller.rb:24:in `index'
2015-01-14T19:52:56.754434+00:00 heroku[router]: at=info method=GET path="/api/v1/schedules/225/requisition_plan/requisition_plan_machines.json?token=mytoken&query=day%3Dmonday%26machine_type%3Dcombo"
“计划位置”不是…计划位置之一。。。呵呵?它在列表中,为什么不搜索
我刚刚将ruby&rails升级到最新版本,遇到了这个问题。我尝试了另一个Scope_搜索,结果很好,嗯。看起来,最新的rails版本还不受支持:
def index
@requisition_plan_machines = @requisition_plan_machines.ordered_by_name.search_for(params[:query])
end