After the change in https://github.com/rails/rails/pull/35799 Rails does not call options_for_through_record anymore. This method was previously used by protected_attributes to pass in the without_protection: true option.
Override the build_through_record method instead and pass the option in there. Only override build_through_record for ActiveRecord versions >= 5.2.3.
After the change in https://github.com/rails/rails/pull/35799 Rails does not call
options_for_through_record
anymore. This method was previously used by protected_attributes to pass in thewithout_protection: true
option.Override the
build_through_record
method instead and pass the option in there. Only overridebuild_through_record
for ActiveRecord versions >= 5.2.3.