aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorJan De Poorter <jan@defv.be>2009-03-09 13:02:31 +0100
committerDavid Heinemeier Hansson <david@loudthinking.com>2009-03-09 13:02:31 +0100
commit277c799d58be4b3e0e885d7b3fd6d954facc111b (patch)
treec127a63d516cf8ef7fd5ab9b495e00ae1c522ba3 /activerecord/test/models
parent9442d843ff2ed8e7845707a95482a43aec8efe95 (diff)
downloadrails-277c799d58be4b3e0e885d7b3fd6d954facc111b.tar.gz
rails-277c799d58be4b3e0e885d7b3fd6d954facc111b.tar.bz2
rails-277c799d58be4b3e0e885d7b3fd6d954facc111b.zip
Fix find_by_last when order is given [#2127 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/company.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/company.rb b/activerecord/test/models/company.rb
index a47992a8e7..02a775f9ef 100644
--- a/activerecord/test/models/company.rb
+++ b/activerecord/test/models/company.rb
@@ -37,6 +37,7 @@ class Firm < Company
has_many :clients, :order => "id", :dependent => :destroy, :counter_sql =>
"SELECT COUNT(*) FROM companies WHERE firm_id = 1 " +
"AND (#{QUOTED_TYPE} = 'Client' OR #{QUOTED_TYPE} = 'SpecialClient' OR #{QUOTED_TYPE} = 'VerySpecialClient' )"
+ has_many :unsorted_clients, :class_name => "Client"
has_many :clients_sorted_desc, :class_name => "Client", :order => "id DESC"
has_many :clients_of_firm, :foreign_key => "client_of", :class_name => "Client", :order => "id"
has_many :unvalidated_clients_of_firm, :foreign_key => "client_of", :class_name => "Client", :validate => false