0
그래서입니다 : 태양 흑점 검색 객체에 대한 다음 대표단 태양 흑점 1.3.0을 사용하여흑점 결과가 응답하지 않습니다? total_pages하지만 total_pages를 메소드로 호출 할 수 있습니다. 다음과 같은 이유를 이해하려고 노력
ree-1.8.7-2011.03 :012 > User.solr_search.results.respond_to?(:total_pages)
=> false
ree-1.8.7-2011.03 :013 > User.solr_search.results.total_pages
=> 624
동안 (내가 대표단이 경우 문제가해야한다고 생각하지만, 포함하고 싶어하지 않는다 여기에 단지 경우).
::Sunspot::Search::StandardSearch.class_eval do
include Enumerable
delegate(
:current_page,
:per_page,
:total_entries,
:total_pages,
:offset,
:previous_page,
:next_page,
:out_of_bounds?,
:each,
:in_groups_of,
:blank?,
:[],
:to => :results
)
end
그래, 문제는 태양 흑점 보석에있는 것 같습니다. 이 기사는 루비 1.9에만 적용됩니다. 고마워! – brupm
인출 요청 환영 : http://github.com/sunspot/sunspot –