-
Notifications
You must be signed in to change notification settings - Fork 792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with kaminari #72
Comments
That's quite weird, see the integration test at https://github.com/elasticsearch/elasticsearch-rails/blob/master/elasticsearch-model/test/integration/active_record_pagination_test.rb#L42 Are you loading Kaminari before the elasticsearch-model gem or configuring it? |
Hi Karmi, thanks for your response. Yes, actually I'm both loading kaminari before the elasticsearch-model gem and also configuring it as you said in a related issue (sorry, forget the issue number). I'm gonna take a look at this integration test in a few hours than I reply here. And before I forget, I'm not using Activerecord, I'm using Mongoid! |
@karmi I just found the error. In a given context my search definition had a |
Yeah, I think think people should just pass a number to |
btw this is also working for me with the patch from #42 |
Good to know @benben. It was my mistake, I'm closing this issue! |
Previously: When klass.default_per_page is 25, response.limit(35).page(3) => :size is back to 25, :from is 25 * 2 response.page(3).limit(35) => :size is 35, but :from is 25 * 2 After this patch: response.limit(35).page(3) => :size is 35, :from is 35 * 2 response.page(3).limit(35) => :size is 35, :from is 35 * 2 Closes #42 Related: #72, #55
Previously: When klass.default_per_page is 25, response.limit(35).page(3) => :size is back to 25, :from is 25 * 2 response.page(3).limit(35) => :size is 35, but :from is 25 * 2 After this patch: response.limit(35).page(3) => :size is 35, :from is 35 * 2 response.page(3).limit(35) => :size is 35, :from is 35 * 2 Closes #42 Related: #72, #55
This works:
Article.search(query: 'Brazil').page(1).records
But this...
Article.search(query: 'Brazil').page(1).records.current_page
Throw this error:
Hash can't be coerced into Fixnum
Because of this error I can't make the kaminari pagination helper to work on my views, am I missing something?
ruby 2.0
rails 3.2
kaminari 0.14.1
kaminari-bootstrap 0.1.3
elasticsearch-rails 0.1.0
elasticsearch-model 0.1.0
The text was updated successfully, but these errors were encountered: