Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

default_per_page remains static #280

Closed
radar opened this Issue · 12 comments

9 participants

Ryan Bigg Paulo Henrique Lopes Ribeiro Scott Walker Yuki Nishijima Akira Matsuda Will Gray Zachary Scott dirkholzapfel Whitney Young
Ryan Bigg

I'm running the tests for Spree's master branch using Kaminari 0.14.0 and I'm getting a failure which is caused by the change in @eaca75e. During the test, I am resetting default_per_page and it seems that kaminari is not acknowledging this change.

How can I fix this problem?

Paulo Henrique Lopes Ribeiro

Where in spree you are doing this? Maybe looking at your code it can be easier to fix. =D

Ryan Bigg

Sorry!

This is the test that is failing with kaminari 0.14.0 and this is the default_per_page helper that we use in the spec

Scott Walker

Seeing the same issue in our tests locally around one of our controllers.

Kaminari.configure { |config| config.default_per_page = 2 }

in a before block does not seem to actually cause the pagination to actually return only two items per page.

Yuki Nishijima yuki24 referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Yuki Nishijima yuki24 referenced this issue from a commit in yuki24/kaminari
Yuki Nishijima yuki24 Revert @eaca75e for amatsuda/kaminari#280 6887c56
Yuki Nishijima
Collaborator

I just pull-requested as #282 for the fix!

Akira Matsuda
Owner

Oops! Sorry for the breakage, and thank you for your prompt report and fix!
The #282 fix was just merged and will be in the next gem package coming soon.

Akira Matsuda amatsuda closed this
Ryan Bigg
Alexey Topolyanskiy devilcoders referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Will Gray

Sorry, but this is still not working for me, using either syntax to change the global default_per_page.

Yuki Nishijima yuki24 referenced this issue from a commit in yuki24/kaminari
Yuki Nishijima yuki24 Revert @eaca75e for amatsuda/kaminari#280 again 062efb5
Yuki Nishijima yuki24 referenced this issue from a commit in yuki24/kaminari
Yuki Nishijima yuki24 Revert @eaca75e for amatsuda/kaminari#280 again 17892d6
Andrew Le andrewle referenced this issue from a commit in andrewle/kaminari
Andrew Le andrewle Merge remote-tracking branch 'upstream/master'
* upstream/master:
  Fix typo: shold -> should
  Use rdoc markup in code
  Fix coercion error when offset_value is nil
  Revert @eaca75e for amatsuda/kaminari#280 again
226bffc
Zachary Scott zzak reopened this
Yuki Nishijima
Collaborator

This issue has been solved by 17892d6. The real issue is that we haven't released a new version for a long time...

Yuki Nishijima yuki24 closed this
Zachary Scott
Collaborator

@yuki24 I re-opened it because I wanted to check on mongoid

Zachary Scott zzak reopened this
dirkholzapfel

@yuki24 Could you please release a new version with this included? I'm a bit afraid to switch to master just to have the right test behavior.

Whitney Young

Master should be stable, and from the talk around here, there should be a release once a few more issues have been sorted out.

Yuki Nishijima yuki24 referenced this issue from a commit in yuki24/kaminari
Yuki Nishijima yuki24 Add tests for configuration methods #280 30eed03
Yuki Nishijima yuki24 closed this issue from a commit
Yuki Nishijima yuki24 Add tests for configuration methods
This commit also includes fix for configuration methods of DataMapper and MongoMapper collection. Closes #280.
408d26d
Yuki Nishijima yuki24 closed this in 408d26d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.