# File lib/active_record/mass_assignment_security/associations.rb, line 4 def build_record(attributes, options) reflection.build_association(attributes, options) do |record| attributes = create_scope.except(*(record.changed - [reflection.foreign_key])) record.assign_attributes(attributes, without_protection: true) end end