diff options
author | Xavier Noria <fxn@hashref.com> | 2010-12-24 01:55:35 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-12-24 01:55:35 +0100 |
commit | 8cdb75808198bf579e14d0fcdd1d2a51b3233add (patch) | |
tree | 9bf4bb54e4175bc805d407e2b5e3bc42bf1d0dd8 /activerecord/test/models/author.rb | |
parent | 3822673151cd0f53e0e4e671988e35603bf2901c (diff) | |
parent | 6974c595fd480dc0ae3311ef60920fa87c5ff9d0 (diff) | |
download | rails-8cdb75808198bf579e14d0fcdd1d2a51b3233add.tar.gz rails-8cdb75808198bf579e14d0fcdd1d2a51b3233add.tar.bz2 rails-8cdb75808198bf579e14d0fcdd1d2a51b3233add.zip |
Merge branch 'master' of github.com:rails/rails
Diffstat (limited to 'activerecord/test/models/author.rb')
-rw-r--r-- | activerecord/test/models/author.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/test/models/author.rb b/activerecord/test/models/author.rb index fd6d2b384a..83a6f5d926 100644 --- a/activerecord/test/models/author.rb +++ b/activerecord/test/models/author.rb @@ -28,7 +28,9 @@ class Author < ActiveRecord::Base has_many :first_posts has_many :comments_on_first_posts, :through => :first_posts, :source => :comments, :order => 'posts.id desc, comments.id asc' - has_one :comment_on_first_posts, :through => :first_posts, :source => :comments, :order => 'posts.id desc, comments.id asc' + + has_one :first_post + has_one :comment_on_first_post, :through => :first_post, :source => :comments, :order => 'posts.id desc, comments.id asc' has_many :thinking_posts, :class_name => 'Post', :conditions => { :title => 'So I was thinking' }, :dependent => :delete_all has_many :welcome_posts, :class_name => 'Post', :conditions => { :title => 'Welcome to the weblog' } @@ -76,6 +78,7 @@ class Author < ActiveRecord::Base has_many :categorizations has_many :categories, :through => :categorizations + has_many :named_categories, :through => :categorizations has_many :special_categorizations has_many :special_categories, :through => :special_categorizations, :source => :category |