Permalink
Browse files

Merge pull request #11479 from henrikhodne/improve-ar-querymethods-in…

…cludes-docs

Improve ActiveRecord::QueryMethods#includes docs [ci skip]
  • Loading branch information...
2 parents faf6f78 + ef350c9 commit 5245648812733d2c31f251de3e05e78e68bfa3a5 @senny senny committed Jul 17, 2013
Showing with 8 additions and 0 deletions.
  1. +8 −0 activerecord/lib/active_record/relation/query_methods.rb
@@ -100,6 +100,14 @@ def create_with_value # :nodoc:
# firing an additional query. This will often result in a
# performance improvement over a simple +join+.
#
+ # You can also specify multiple relationships, like this:
+ #
+ # users = User.includes(:address, :friends)
+ #
+ # Loading nested relationships is possible using a Hash:
+ #
+ # users = User.includes(:address, friends: [:address, :followers])
+ #
# === conditions
#
# If you want to add conditions to your included models you'll have

0 comments on commit 5245648

Please sign in to comment.