Closed gazayas closed 2 years ago
I ran across this in a project I'm working on and found out other people were having the same problem: Issue #225.
super was calling the following method in ActiveRecord:
super
def belongs_to(name, scope = nil, **options) reflection = Builder::BelongsTo.build(self, name, scope, options) Reflection.add_reflection self, name, reflection end
options was getting substituted into scope which was causing the bug. There might be a better fix for this (Using ruby2_keywords?) so I can look over the code just in case, but this fixes the issue for me.
options
scope
This was fixed in (f644831), but hasn't been included in a versioned release yet.
I ran across this in a project I'm working on and found out other people were having the same problem: Issue #225.
super
was calling the following method in ActiveRecord:options
was getting substituted intoscope
which was causing the bug. There might be a better fix for this (Using ruby2_keywords?) so I can look over the code just in case, but this fixes the issue for me.