diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-01-06 18:04:32 +0000 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-07 15:03:15 -0800 |
commit | 770e6893b9f2aaaebe3de10576931dc7194451bc (patch) | |
tree | a69337db0ed7743d302a9d54c142efa5447ab810 /activerecord/test/models/company.rb | |
parent | 441118458d57011ee1b1f1dcfea558de462c6da9 (diff) | |
download | rails-770e6893b9f2aaaebe3de10576931dc7194451bc.tar.gz rails-770e6893b9f2aaaebe3de10576931dc7194451bc.tar.bz2 rails-770e6893b9f2aaaebe3de10576931dc7194451bc.zip |
Construct an actual ActiveRecord::Relation object for the association scope, rather than a hash which is passed to apply_finder_options. This allows more flexibility in how the scope is created, for example because scope.where(a, b) and scope.where(a).where(b) mean different things.
Diffstat (limited to 'activerecord/test/models/company.rb')
-rw-r--r-- | activerecord/test/models/company.rb | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/activerecord/test/models/company.rb b/activerecord/test/models/company.rb index d08e593db1..f6e7a5ccf7 100644 --- a/activerecord/test/models/company.rb +++ b/activerecord/test/models/company.rb @@ -49,7 +49,6 @@ class Firm < Company has_many :exclusively_dependent_clients_of_firm, :foreign_key => "client_of", :class_name => "Client", :order => "id", :dependent => :delete_all has_many :limited_clients, :class_name => "Client", :limit => 1 has_many :clients_like_ms, :conditions => "name = 'Microsoft'", :class_name => "Client", :order => "id" - has_many :clients_with_interpolated_conditions, :class_name => "Client", :conditions => 'rating > #{rating}' has_many :clients_like_ms_with_hash_conditions, :conditions => { :name => 'Microsoft' }, :class_name => "Client", :order => "id" has_many :clients_using_sql, :class_name => "Client", :finder_sql => 'SELECT * FROM companies WHERE client_of = #{id}' has_many :clients_using_multiline_sql, :class_name => "Client", :finder_sql => ' |