From ea51d72edb36737445834777f06664096066a0ba Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Sun, 28 May 2006 21:33:34 +0000 Subject: Provide Association Extensions access to the instance that the association is being accessed from. Closes #4433 [josh@hasmanythrough.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4372 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/fixtures/author.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'activerecord/test/fixtures/author.rb') diff --git a/activerecord/test/fixtures/author.rb b/activerecord/test/fixtures/author.rb index ec844f6238..a9102a269a 100644 --- a/activerecord/test/fixtures/author.rb +++ b/activerecord/test/fixtures/author.rb @@ -3,6 +3,17 @@ class Author < ActiveRecord::Base has_many :posts_with_comments, :include => :comments, :class_name => "Post" 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 :posts_with_extension, :class_name => "Post" do #, :extend => ProxyTestExtension + def testing_proxy_owner + proxy_owner + end + def testing_proxy_reflection + proxy_reflection + end + def testing_proxy_target + proxy_target + end + end has_many :comments, :through => :posts has_many :funky_comments, :through => :posts, :source => :comments -- cgit v1.2.3