aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorCaleb Thompson <caleb@calebthompson.io>2015-01-08 12:03:17 -0600
committerschneems <richard.schneeman@gmail.com>2015-01-08 12:20:37 -0600
commit17136c201320e9a041f2d98eacd299f2ce3eb154 (patch)
tree25f18e009c944504c4a135b8b5e7b25d122f294b /activerecord
parent0e8c7ff7f7988e9b0bfae91ca4f27b200f8f6541 (diff)
downloadrails-17136c201320e9a041f2d98eacd299f2ce3eb154.tar.gz
rails-17136c201320e9a041f2d98eacd299f2ce3eb154.tar.bz2
rails-17136c201320e9a041f2d98eacd299f2ce3eb154.zip
Document has_many :extend option
https://github.com/rails/rails/commit/5937bd02dee112646469848d7fe8a8bfcef5b4c1#commitcomment-9205786
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/associations.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index 14af55f327..35bc09bb10 100644
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -1245,6 +1245,10 @@ module ActiveRecord
# that is the inverse of this <tt>has_many</tt> association. Does not work in combination
# with <tt>:through</tt> or <tt>:as</tt> options.
# See ActiveRecord::Associations::ClassMethods's overview on Bi-directional associations for more detail.
+ # [:extend]
+ # Specifies a module or array of modules that will be extended into the association object returned.
+ # Useful for defining methods on associations, especially when they should be shared between multiple
+ # association objects.
#
# Option examples:
# has_many :comments, -> { order "posted_on" }