Hi there,
i upgraded to TS 1.2.0 yesterday and noticed that Pagination fails.
The URL in Question which is accessed is
http://development.myproject.com/clubs?page=2
It seems that it lacks a ".to_i"-Call in the current_page-method of
search.rb:
def current_page
@options[:page] || 1
end
shoud probably be
def current_page
@options[:page].to_i || 1
end
I checked the older version of TS and it handles the conversion around
Line 464 in the method search_results
client.limit = options[:per_page].to_i if options[:per_page]
page = options[:page] ? options[:page].to_i : 1
page = 1 if page <= 0
For the sake of completeness, here is the Error output with 1.2.0:
undefined method `-' for "2":String
/opt/ruby-enterprise-1.8.6-20080810/lib/ruby/gems/1.8/gems/freelancing-
god-thinking-sphinx-1.2.0/lib/thinking_sphinx/search.rb:158:in
`offset'
[...]
Greets
-act
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---