aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/active_relation/extensions/base.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/active_relation/extensions/base.rb b/lib/active_relation/extensions/base.rb
index 53523e9d12..8fe00146d2 100644
--- a/lib/active_relation/extensions/base.rb
+++ b/lib/active_relation/extensions/base.rb
@@ -20,6 +20,8 @@ class ActiveRecord::Base
end
end
+# all of the below disables normal AR behavior. It's rather destructive and purely for demonstration purposes (see scratch_spec).
+
class ActiveRecord::Associations::BelongsToAssociation
def instantiate(record, joins = [])
@target = proxy_reflection.klass.instantiate(record, joins)