From 34f9d30e399050e776263441ee1d4415d0b2c254 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 22 Jul 2005 20:05:42 +0000 Subject: Added support for calling constrained class methods on has_many and has_and_belongs_to_many collections #1764 [Tobias Luetke] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1894 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/fixtures/category.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'activerecord/test/fixtures/category.rb') diff --git a/activerecord/test/fixtures/category.rb b/activerecord/test/fixtures/category.rb index 822defa03e..880eb1573d 100644 --- a/activerecord/test/fixtures/category.rb +++ b/activerecord/test/fixtures/category.rb @@ -1,5 +1,15 @@ class Category < ActiveRecord::Base has_and_belongs_to_many :posts + + def self.what_are_you + 'a category...' + end end -class SpecialCategory < Category; end; +class SpecialCategory < Category + + def self.what_are_you + 'a special category...' + end + +end -- cgit v1.2.3