aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorTarmo Tänav <tarmo@itech.ee>2008-09-10 13:39:50 +0300
committerMichael Koziarski <michael@koziarski.com>2008-09-10 13:41:49 +0200
commit7c9851dbb6f841ffbf3ebd16e9f57c04319d3a39 (patch)
treeadc55140a573c0c7cd99a405f2f593e721f1efb3 /activerecord/test/models
parent14d1560e85d5c4795c21ddb00953cf55e0525ee3 (diff)
downloadrails-7c9851dbb6f841ffbf3ebd16e9f57c04319d3a39.tar.gz
rails-7c9851dbb6f841ffbf3ebd16e9f57c04319d3a39.tar.bz2
rails-7c9851dbb6f841ffbf3ebd16e9f57c04319d3a39.zip
Support :limit on update_all so that has_many with :limit can be safely updated
Signed-off-by: Michael Koziarski <michael@koziarski.com>
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/author.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/author.rb b/activerecord/test/models/author.rb
index c6aa0293c2..ad0123cf2c 100644
--- a/activerecord/test/models/author.rb
+++ b/activerecord/test/models/author.rb
@@ -2,6 +2,7 @@ class Author < ActiveRecord::Base
has_many :posts, :accessible => true
has_many :posts_with_comments, :include => :comments, :class_name => "Post"
has_many :posts_with_comments_sorted_by_comment_id, :include => :comments, :class_name => "Post", :order => 'comments.id'
+ has_many :posts_sorted_by_id_limited, :class_name => "Post", :order => 'posts.id', :limit => 1
has_many :posts_with_categories, :include => :categories, :class_name => "Post"
has_many :posts_with_comments_and_categories, :include => [ :comments, :categories ], :order => "posts.id", :class_name => "Post"
has_many :posts_containing_the_letter_a, :class_name => "Post"