aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/relation.rb')
-rw-r--r--activerecord/lib/active_record/relation.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb
index a51b317dc3..fd0660a138 100644
--- a/activerecord/lib/active_record/relation.rb
+++ b/activerecord/lib/active_record/relation.rb
@@ -328,6 +328,15 @@ module ActiveRecord
to_a.inspect
end
+ def extend(*args, &block)
+ if block_given?
+ apply_modules Module.new(&block)
+ self
+ else
+ super
+ end
+ end
+
protected
def method_missing(method, *args, &block)