Skip to content

Commit

Permalink
Clean up unused associations in AR test model
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda authored and arunagw committed Sep 10, 2013
1 parent b1116bd commit 132190f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions activerecord/test/models/author.rb
Expand Up @@ -8,9 +8,7 @@ class Author < ActiveRecord::Base
has_many :posts_sorted_by_id_limited, -> { order('posts.id').limit(1) }, :class_name => "Post"
has_many :posts_with_categories, -> { includes(:categories) }, :class_name => "Post"
has_many :posts_with_comments_and_categories, -> { includes(:comments, :categories).order("posts.id") }, :class_name => "Post"
has_many :posts_containing_the_letter_a, :class_name => "Post"
has_many :posts_with_special_categorizations, :class_name => 'PostWithSpecialCategorization'
has_many :posts_with_extension, :class_name => "Post"
has_one :post_about_thinking, -> { where("posts.title like '%thinking%'") }, :class_name => 'Post'
has_one :post_about_thinking_with_last_comment, -> { where("posts.title like '%thinking%'").includes(:last_comment) }, :class_name => 'Post'
has_many :comments, through: :posts do
Expand All @@ -32,7 +30,6 @@ def ratings
has_many :welcome_posts, -> { where(:title => 'Welcome to the weblog') }, :class_name => 'Post'

has_many :comments_desc, -> { order('comments.id DESC') }, :through => :posts, :source => :comments
has_many :limited_comments, -> { limit(1) }, :through => :posts, :source => :comments
has_many :funky_comments, :through => :posts, :source => :comments
has_many :ordered_uniq_comments, -> { distinct.order('comments.id') }, :through => :posts, :source => :comments
has_many :ordered_uniq_comments_desc, -> { distinct.order('comments.id DESC') }, :through => :posts, :source => :comments
Expand Down

0 comments on commit 132190f

Please sign in to comment.