diff options
Diffstat (limited to 'activerecord/test/models/tag.rb')
-rw-r--r-- | activerecord/test/models/tag.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/models/tag.rb b/activerecord/test/models/tag.rb new file mode 100644 index 0000000000..a581b381e8 --- /dev/null +++ b/activerecord/test/models/tag.rb @@ -0,0 +1,7 @@ +class Tag < ActiveRecord::Base + has_many :taggings + has_many :taggables, :through => :taggings + has_one :tagging + + has_many :tagged_posts, :through => :taggings, :source => :taggable, :source_type => 'Post' +end
\ No newline at end of file |