Fix ActiveRecord empty? method on grouped results #161

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

javierg commented Aug 16, 2011

This is a prouposal fix based on 87f827

Contributor

phene commented Sep 6, 2011

I get NoMethodError: undefined method <= for true:TrueClass

Contributor

phene commented Sep 6, 2011

found the issue:

relation_count = count.respond_to?(:size) && !count.is_a?(Integer) ? count.size : count

instead of

relation_count = count.respond_to?(:size) and !count.is_a?(Integer) ? count.size : count

The 'and' keyword has a much lower OoO than &&

javierg commented Sep 6, 2011

Tnx, will prepare another pull request

Contributor

phene commented Sep 8, 2011

Went ahead and prepared one: #178

@mislav mislav closed this in 8ce2276 Sep 8, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment