aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/association_scope.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2013-01-18 12:30:47 +0000
committerJon Leighton <j@jonathanleighton.com>2013-01-18 12:30:47 +0000
commit5937bd02dee112646469848d7fe8a8bfcef5b4c1 (patch)
tree9406b572ea9d9fadcfabca94084834e1188f8c25 /activerecord/lib/active_record/associations/association_scope.rb
parent5f759ff063b8ed054cdde0ed4f3593ef89fe59b7 (diff)
downloadrails-5937bd02dee112646469848d7fe8a8bfcef5b4c1.tar.gz
rails-5937bd02dee112646469848d7fe8a8bfcef5b4c1.tar.bz2
rails-5937bd02dee112646469848d7fe8a8bfcef5b4c1.zip
Undeprecate the :extend option
Suggested by @dhh. It doesn't affect the generated SQL, so seems reasonable to continue to allow it as an association option.
Diffstat (limited to 'activerecord/lib/active_record/associations/association_scope.rb')
-rw-r--r--activerecord/lib/active_record/associations/association_scope.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations/association_scope.rb b/activerecord/lib/active_record/associations/association_scope.rb
index 1303822868..300f67959d 100644
--- a/activerecord/lib/active_record/associations/association_scope.rb
+++ b/activerecord/lib/active_record/associations/association_scope.rb
@@ -16,6 +16,7 @@ module ActiveRecord
def scope
scope = klass.unscoped
scope.merge! eval_scope(klass, reflection.scope) if reflection.scope
+ scope.extending! Array(options[:extend])
add_constraints(scope)
end