0
Index操作改變元搜索參數
@search = Project.search(params[:search])
@projects = @search.order('created_at desc').paginate(:page => params[:page], :per_page => 100)
@total_projects = Project.count
respond_to do |format|
format.html
format.mobile
format.json { render :json => @projects }
end
如果params[:search][:stage_in]
存在,並以「TIME_END」我想改變它像這樣params[:search][:stage_in] == "started"
這是平等的,它可以與@search