diff options
author | Rick Olson <technoweenie@gmail.com> | 2008-03-21 18:21:56 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2008-03-21 18:21:56 +0000 |
commit | c23c9bd11bc16618a1765eb61424014912a6e1d7 (patch) | |
tree | 4fcea83532d0c64e4aa86f455a5cabecb74c851a /activerecord/test/models | |
parent | 273b21faa911681ed4b6c748676146e0f6eed0a0 (diff) | |
download | rails-c23c9bd11bc16618a1765eb61424014912a6e1d7.tar.gz rails-c23c9bd11bc16618a1765eb61424014912a6e1d7.tar.bz2 rails-c23c9bd11bc16618a1765eb61424014912a6e1d7.zip |
Allow association scoping for built/created records if :conditions is specified as a hash. Closes #11393 [miloops]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9068 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/category.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/test/models/category.rb b/activerecord/test/models/category.rb index 89d61b7e4e..f1d2e4805a 100644 --- a/activerecord/test/models/category.rb +++ b/activerecord/test/models/category.rb @@ -9,6 +9,9 @@ class Category < ActiveRecord::Base :association_foreign_key => 'post_id', :select => 'posts.*, 1 as correctness_marker') + has_and_belongs_to_many :post_with_conditions, + :class_name => 'Post', + :conditions => { :title => 'Yet Another Testing Title' } def self.what_are_you 'a category...' end |