vendor/activerecord/test/models/post.rb in relevance-castronaut-0.5.4 vs vendor/activerecord/test/models/post.rb in relevance-castronaut-0.6.0
- old
+ new
@@ -11,17 +11,20 @@
"hello"
end
end
belongs_to :author_with_posts, :class_name => "Author", :foreign_key => :author_id, :include => :posts
+ belongs_to :author_with_address, :class_name => "Author", :foreign_key => :author_id, :include => :author_address
has_one :last_comment, :class_name => 'Comment', :order => 'id desc'
has_many :comments, :order => "body" do
def find_most_recent
find(:first, :order => "id DESC")
end
end
+
+ has_many :author_favorites, :through => :author
has_many :comments_with_interpolated_conditions, :class_name => 'Comment',
:conditions => ['#{"#{aliased_table_name}." rescue ""}body = ?', 'Thank you for the welcome']
has_one :very_special_comment