diff options
author | Marcel Molina <marcel@vernix.org> | 2007-10-26 03:42:28 +0000 |
---|---|---|
committer | Marcel Molina <marcel@vernix.org> | 2007-10-26 03:42:28 +0000 |
commit | bf658a906bf32127429f3ba808cef65c49b59607 (patch) | |
tree | 3423b2b9689a903561b20168c2fc59f7a4504c56 /activerecord/test/fixtures | |
parent | 7f8183e3c4449d2442a95ed75504d1fba4b4cf8d (diff) | |
download | rails-bf658a906bf32127429f3ba808cef65c49b59607.tar.gz rails-bf658a906bf32127429f3ba808cef65c49b59607.tar.bz2 rails-bf658a906bf32127429f3ba808cef65c49b59607.zip |
Allow find on a has_many association defined with :finder_sql to accept id arguments as strings like regular find does. Closes #9916 [krishna]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8030 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/fixtures')
-rwxr-xr-x | activerecord/test/fixtures/company.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/fixtures/company.rb b/activerecord/test/fixtures/company.rb index 0c93c80e03..1048d5a652 100755 --- a/activerecord/test/fixtures/company.rb +++ b/activerecord/test/fixtures/company.rb @@ -38,6 +38,7 @@ class Firm < Company has_many :no_clients_using_counter_sql, :class_name => "Client", :finder_sql => 'SELECT * FROM companies WHERE client_of = 1000', :counter_sql => 'SELECT COUNT(*) FROM companies WHERE client_of = 1000' + has_many :clients_using_finder_sql, :class_name => "Client", :finder_sql => 'SELECT * FROM companies WHERE 1=1' has_many :plain_clients, :class_name => 'Client' has_one :account, :foreign_key => "firm_id", :dependent => :destroy |