Jason Garber
2006-Jun-30 02:55 UTC
[Rails] Interpolation in association conditions broken; broken backwards-compatibility?
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 Garber, Web Programmer Eastern Mennonite University -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060630/fc9a3d82/attachment.html