diff options
author | Tiago Macedo <tmacedo@webreakstuff.com> | 2008-07-11 04:18:41 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-07-14 23:34:19 +0100 |
commit | 76df9fa0680d62ce41fa6f3b743c605101d101d2 (patch) | |
tree | c33756ffab05d20ac904fcdda2dc27955a4fac3e /activerecord/test/cases | |
parent | cd9b24286a90111a08002e0da753198c5fb2432a (diff) | |
download | rails-76df9fa0680d62ce41fa6f3b743c605101d101d2.tar.gz rails-76df9fa0680d62ce41fa6f3b743c605101d101d2.tar.bz2 rails-76df9fa0680d62ce41fa6f3b743c605101d101d2.zip |
Fix integer quoting issues in association preload. [#602 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/test/cases')
-rwxr-xr-x | activerecord/test/cases/inheritance_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/inheritance_test.rb b/activerecord/test/cases/inheritance_test.rb index 47fb5c608f..4fd38bfbc9 100755 --- a/activerecord/test/cases/inheritance_test.rb +++ b/activerecord/test/cases/inheritance_test.rb @@ -191,6 +191,13 @@ class InheritanceTest < ActiveRecord::TestCase assert_not_nil account.instance_variable_get("@firm"), "nil proves eager load failed" end + def test_eager_load_belongs_to_primary_key_quoting + con = Account.connection + assert_sql(/\(#{con.quote_table_name('companies')}.#{con.quote_column_name('id')} IN \(1\)\)/) do + Account.find(1, :include => :firm) + end + end + def test_alt_eager_loading switch_to_alt_inheritance_column test_eager_load_belongs_to_something_inherited |