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

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

2 participants

@mickeb

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
ActiveRecord Hackery member

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

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
ActiveRecord Hackery member
@mickeb

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