undefined method `relation' for #<Arel::Nodes::NamedFunction> #156

Closed
mickeb opened this Issue Aug 17, 2012 · 4 comments

Projects

None yet

2 participants

@mickeb
mickeb commented Aug 17, 2012

Hello!

After upgrading to Active Record 3.2.8 and Squeel 1.0.9 our specs fails with:

/Users/mikaelbjorkman/.rvm/gems/ruby-1.9.3-p125-perf/gems/activerecord-3.2.8/lib/active_record/relation/spawn_methods.rb:41:in block in merge': undefined methodrelation' for #Arel::Nodes::NamedFunction:0x007fbde1fa4b40 (NoMethodError)

I have written a bare bone reproduction: https://gist.github.com/3378438

From what I can tell, the equality operator seems to be the problem. Greater/Less than works.

Thanks for your hard work on this gem!

Best regards
Micke

@ernie
Member
ernie commented Aug 17, 2012

Unfortunately, this is due to a bug/missing feature in Rails. I just checked and it fails across the board in 3.0.x - 3.2.x. Not sure how the spec was ever passing for you before now.

@mickeb
mickeb commented Aug 17, 2012

Ok, I see.

I reverted back to the old version to double check.

bundle show rails => rails-3.2.5
bundle show squeel => squeel-0.9.5

Played around i the console and it does seem to work. However, let me get back to you on monday with at fresh mind and a extra set of eyes. Don't want to waste anybodys time.

regards
Micke

@ernie
Member
ernie commented Aug 17, 2012

If you were using a version that old, then yeah, that might be the case. There weren't Equality nodes in the merge back then, at all.

On Aug 17, 2012, at 11:34 AM, Mikael Björkman notifications@github.com wrote:

Ok, I see.

I reverted back to the old version to double check.

bundle show rails => rails-3.2.5
bundle show squeel => squeel-0.9.5

Played around i the console and it does seem to work. However, let me get back to you on monday with at fresh mind and a extra set of eyes. Don't want to waste anybodys time.

regards
Micke


Reply to this email directly or view it on GitHub.

@mickeb
mickeb commented Aug 20, 2012

No further questions. Great to see a solution beeing worked on. Thanks!

@mickeb mickeb closed this Aug 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment