Skip to content
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

Failing specs for total_entries in Rails 4.1 #389

Closed
wants to merge 2 commits into from
Closed

Failing specs for total_entries in Rails 4.1 #389

wants to merge 2 commits into from

Conversation

nathany
Copy link
Contributor

@nathany nathany commented Jun 18, 2014

This is the case where count(:all) should be the solution.
https://github.com/mislav/will_paginate/blob/master/lib/will_paginate/active_record.rb#L79

But that fails another test:

WillPaginate::ActiveRecord should not ignore :select parameter when it says DISTINCT
https://github.com/mislav/will_paginate/blob/master/spec/finders/active_record_spec.rb#L214

Using count(:all) doesn't work as desired if we actually want to keep the distinct select('DISTINCT salary'). And it appears not to work alongside select('salary').distinct either.

I'm not sure what the solution is.

@mislav
Copy link
Owner

mislav commented Jun 18, 2014

Not sure what are you asking or what's going on :-]

@nathany
Copy link
Contributor Author

nathany commented Jun 18, 2014

@mislav Did you have a chance to look at the test and the failing spec in Travis CI?

I added line references to the description. Hope that helps.

some background: rails/rails#10710

@nathany nathany changed the title failing spec for total_entries in Rails 4.1 failing specs for total_entries in Rails 4.1 Jun 18, 2014
@nathany nathany changed the title failing specs for total_entries in Rails 4.1 Failing specs for total_entries in Rails 4.1 Jun 18, 2014
@nathany
Copy link
Contributor Author

nathany commented Jun 19, 2014

So far will_paginate master has been working well with Rails 4.1 (our specs are passing). And we don't appear to need activerecord-deprecated_finders in our Gemfile either.

Still doing more testing.

@nathany nathany closed this Jun 19, 2014
@nathany
Copy link
Contributor Author

nathany commented Jun 19, 2014

Working well. If there were a will_paginate 3.0.6+, I'd be using it now. :-D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants