0
상점, 차트 및 마지막 모델을 검색하고 싶습니다.
시간과 좌표에 대해서는 ID를 세션에 넣었습니다.
id를 다른 용도로 사용하고 싶습니다.
ID의 원본 모델을 식별 할 수있는 방법이 있습니까?태양 흑단 다중 모델 검색에서 모델을 식별하는 방법은 무엇입니까?
@searchs = Sunspot.search store, chart, last do |s|
s.fulltext params[:search]
s.with(:end_at).greater_than(Time.now)
end.results
ar=[]
@searchs.each do |a|
if a.coordinate_x.nil? || a.coordinate_y.nil?
next
end
ar << a.id
end
session[:stores_id] = ar