ActiveRecord::Relation these days?
In prior versions of Rails, this would work:
assume (pseudo code):
at = B.arel_table
atalias = at.alias(at.name + "_1")
= 'foo'").where("b_1.widget = 'bar'"). ...
^ probably should be "on"
now in 3.1.1: passing in a arel_table into join ... returns a String,
not a relation, breaking the ActiveRecord::Relation chain.
In short: if we want to find A's where they contain *both* a B.widget
'foo' and a B.widget 'bar' ...
how do we do this without writing custom SQL ?
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to email@example.com.
To unsubscribe from this group, send email to firstname.lastname@example.org.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.