You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 5, 2020. It is now read-only.
# stores the correct classhash={'id'=>object.id,'type'=>object.class.name}iffields=definition.send(type)[class_sym].try(:[],:cache)fields.eachdo |field|
raiseErrors::InvalidField.new(field)unlessobject.respond_to?(field)# here it gets overriten by STI "type" fieldhash[field.to_s]=object.send(field)endendwrite_attribute(type,hash)end
Where the type is rewritten by the one from the model's attributes and the load_instance is than throwing an error because it could not find an object based on this type. Note that this only happens if the type column is being cached.