Interpolation in association conditions broken; broken backw

I believe it used to be possible to interpolate values into
associations’ conditions with single quotes, but it isn’t anymore.
has_many :widgets, :conditions => ‘brand_id = #{brand_id}’
Anyone else remember that? It seems to have been snuffed out in
changeset 3897 with the removal of interpolate_sql(@conditions)

Was the change (and the fact that it breaks backwards-compatibility)
known and announced or is it just an oversight? Once in awhile
there’s just no other way to do what this allows (short
of :finder_sql, which limits you significantly).

Thanks,

Jason G.,
Web Programmer
Eastern Mennonite University

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs