-
Notifications
You must be signed in to change notification settings - Fork 864
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
New gem release #399
Comments
No, it is not. I was just playing around with this. This is what the relevant code looks like in master in active_record.rb: def count(*args)
if limit_value
excluded = [:order, :limit, :offset, :reorder]
excluded << :includes unless eager_loading?
rel = self.except(*excluded)
# TODO: hack. decide whether to keep
rel = rel.apply_finder_options(@wp_count_options) if defined? @wp_count_options
column_name = (select_for_count(rel) || :all)
rel.count(column_name)
else
super(*args)
end
end
def select_for_count(rel)
if rel.select_values.present?
select = rel.select_values.join(", ")
select if select !~ /[,*]/
end
end And this is what they have so far in v3.0.6: def count(*args)
if limit_value
excluded = [:order, :limit, :offset, :reorder]
excluded << :includes unless eager_loading?
rel = self.except(*excluded)
# TODO: hack. decide whether to keep
rel = rel.apply_finder_options(@wp_count_options) if defined? @wp_count_options
rel.count(*args)
else
super(*args)
end
end |
@mislav released 3.0.7. #372 (comment) Testing it now. |
Good to go. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm seeing errors when using
total_entries
since switching from master to 3.0.6. If I switch back to master my specs pass again.Is #372 included in the 3.0.6 gem release?
The text was updated successfully, but these errors were encountered: