Method: ActiveRecord::Associations::Association#marshal_dump

Defined in:
lib/active_record/associations/association.rb

#marshal_dumpObject

We can’t dump @reflection and @through_reflection since it contains the scope proc



182
183
184
185
# File 'lib/active_record/associations/association.rb', line 182

def marshal_dump
  ivars = (instance_variables - [:@reflection, :@through_reflection]).map { |name| [name, instance_variable_get(name)] }
  [@reflection.name, ivars]
end