diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-11-04 18:14:29 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-11-04 18:14:29 +0100 |
commit | a909eecbbd42e70a5bc0e099485f07dc64db5d38 (patch) | |
tree | a685d297c7f11fa2ea87a5dd69ad7052696532d8 /activerecord/lib | |
parent | b29f95ed9a4f09674a187b237acc143ac5f4ddde (diff) | |
parent | 18bf7b421d55c60029289edef1df409a58d021e4 (diff) | |
download | rails-a909eecbbd42e70a5bc0e099485f07dc64db5d38.tar.gz rails-a909eecbbd42e70a5bc0e099485f07dc64db5d38.tar.bz2 rails-a909eecbbd42e70a5bc0e099485f07dc64db5d38.zip |
Dont log the _method attribute either. Its already available in the header
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/associations.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 84caca3518..c7cb6eb966 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -507,6 +507,14 @@ module ActiveRecord # # will load posts and eager load the +approved_comments+ association, which contains only those comments that have been approved. # + # If you eager load an association with a specified <tt>:limit</tt> option, it will be ignored, returning all the associated objects: + # + # class Picture < ActiveRecord::Base + # has_many :most_recent_comments, :class_name => 'Comment', :order => 'id DESC', :limit => 10 + # end + # + # Picture.find(:first, :include => :most_recent_comments).most_recent_comments # => returns all associated comments. + # # When eager loaded, conditions are interpolated in the context of the model class, not the model instance. Conditions are lazily interpolated # before the actual model exists. # |