diff options
Diffstat (limited to 'activerecord/lib/active_record/associations.rb')
-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 369983632d..f862d9e777 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -215,6 +215,14 @@ module ActiveRecord # has_many :people, :extend => FindOrCreateByNameExtension # end # + # If you need to use multiple named extension modules, you can specify an array of modules with the :extend option. + # In the case of name conflicts between methods in the modules, methods in modules later in the array supercede + # those earlier in the array. Example: + # + # class Account < ActiveRecord::Base + # has_many :people, :extend => [FindOrCreateByNameExtension, FindRecentExtension] + # end + # # === Association Join Models # # Has Many associations can be configured with the :through option to use an explicit join model to retrieve the data. This |