aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/fixtures/author.rb
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-03-18 23:14:31 +0000
committerRick Olson <technoweenie@gmail.com>2006-03-18 23:14:31 +0000
commit9c9069a67595f620f80eabc475181cb36a26cdde (patch)
treea2a8aebf762be6d73ec8cab1d5f0a1c8eb84356b /activerecord/test/fixtures/author.rb
parenta46214c4f9e7117796f2a5ed1414a83c2ca4c6bd (diff)
downloadrails-9c9069a67595f620f80eabc475181cb36a26cdde.tar.gz
rails-9c9069a67595f620f80eabc475181cb36a26cdde.tar.bz2
rails-9c9069a67595f620f80eabc475181cb36a26cdde.zip
Fixed has_many :through to include :conditions set on the :through association. closes #4020 [jonathan@bluewire.net.nz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3958 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/fixtures/author.rb')
-rw-r--r--activerecord/test/fixtures/author.rb19
1 files changed, 10 insertions, 9 deletions
diff --git a/activerecord/test/fixtures/author.rb b/activerecord/test/fixtures/author.rb
index 0f0d1b12d9..06b0aaa1ae 100644
--- a/activerecord/test/fixtures/author.rb
+++ b/activerecord/test/fixtures/author.rb
@@ -4,20 +4,21 @@ class Author < ActiveRecord::Base
has_many :posts_with_categories, :include => :categories, :class_name => "Post"
has_many :posts_with_comments_and_categories, :include => [ :comments, :categories ], :order => "posts.id", :class_name => "Post"
- has_many :special_posts, :class_name => "Post"
- has_many :hello_posts, :class_name => "Post", :conditions=>"\#{aliased_table_name}.body = 'hello'"
- has_many :nonexistent_posts, :class_name => "Post", :conditions=>"\#{aliased_table_name}.body = 'nonexistent'"
+ has_many :special_posts, :class_name => "Post"
+ has_many :hello_posts, :class_name => "Post", :conditions=>"\#{aliased_table_name}.body = 'hello'"
+ has_many :nonexistent_posts, :class_name => "Post", :conditions=>"\#{aliased_table_name}.body = 'nonexistent'"
has_many :posts_with_callbacks, :class_name => "Post", :before_add => :log_before_adding,
- :after_add => :log_after_adding, :before_remove => :log_before_removing,
- :after_remove => :log_after_removing
+ :after_add => :log_after_adding,
+ :before_remove => :log_before_removing,
+ :after_remove => :log_after_removing
has_many :posts_with_proc_callbacks, :class_name => "Post",
- :before_add => Proc.new {|o, r| o.post_log << "before_adding#{r.id}"},
- :after_add => Proc.new {|o, r| o.post_log << "after_adding#{r.id}"},
+ :before_add => Proc.new {|o, r| o.post_log << "before_adding#{r.id}"},
+ :after_add => Proc.new {|o, r| o.post_log << "after_adding#{r.id}"},
:before_remove => Proc.new {|o, r| o.post_log << "before_removing#{r.id}"},
- :after_remove => Proc.new {|o, r| o.post_log << "after_removing#{r.id}"}
+ :after_remove => Proc.new {|o, r| o.post_log << "after_removing#{r.id}"}
has_many :posts_with_multiple_callbacks, :class_name => "Post",
:before_add => [:log_before_adding, Proc.new {|o, r| o.post_log << "before_adding_proc#{r.id}"}],
- :after_add => [:log_after_adding, Proc.new {|o, r| o.post_log << "after_adding_proc#{r.id}"}]
+ :after_add => [:log_after_adding, Proc.new {|o, r| o.post_log << "after_adding_proc#{r.id}"}]
has_many :unchangable_posts, :class_name => "Post", :before_add => :raise_exception, :after_add => :log_after_adding
has_many :categorizations