diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-02-11 22:22:19 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-02-14 01:40:31 +0000 |
commit | a7e19b30ca71f62af516675023659be061b2b70a (patch) | |
tree | f79f1347800952dff958dca5f34f1ce011e365ed /activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb | |
parent | fd7605826a6e4f7590e4abf42c6c9d0923afc4ef (diff) | |
download | rails-a7e19b30ca71f62af516675023659be061b2b70a.tar.gz rails-a7e19b30ca71f62af516675023659be061b2b70a.tar.bz2 rails-a7e19b30ca71f62af516675023659be061b2b70a.zip |
Add interpolation of association conditions back in, in the form of proc { ... } rather than instance_eval-ing strings
Diffstat (limited to 'activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb')
-rw-r--r-- | activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb index 5dd2c9861e..dc382c3007 100644 --- a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb @@ -72,7 +72,7 @@ class DeveloperWithCounterSQL < ActiveRecord::Base :join_table => "developers_projects", :association_foreign_key => "project_id", :foreign_key => "developer_id", - :counter_sql => 'SELECT COUNT(*) AS count_all FROM projects INNER JOIN developers_projects ON projects.id = developers_projects.project_id WHERE developers_projects.developer_id =#{id}' + :counter_sql => proc { "SELECT COUNT(*) AS count_all FROM projects INNER JOIN developers_projects ON projects.id = developers_projects.project_id WHERE developers_projects.developer_id =#{id}" } end class HasAndBelongsToManyAssociationsTest < ActiveRecord::TestCase |