We’ve got a nested method we’re trying to update for Rails 3. However,
it appears to be generating invalid sql. The old Rails 2 method
worked. What am I doing wrong?
The tables in question are sites, photos, site_photos
get invalid sql when try to use a scope with “select distinct”:
basically, the “select” i specify does not override the default implicit
select of the has_many join, but instead gets appended to it (as in
daniel’s example)
get invalid sql when try to use a scope with “select distinct”:
basically, the “select” i specify does not override the default implicit
select of the has_many join, but instead gets appended to it (as in
daniel’s example)
Does anyone know if this is by design, or a bug?
I’m guessing bug. As of Arel 2.0.6 I’m no longer getting invalid sql,
but I’m not getting valid results either.