go through nested autosave associations that are loaded in memory (without
loading any new ones), and return true if is changed for autosave
# File activerecord/lib/active_record/autosave_association.rb, line 243
def nested_records_changed_for_autosave?
self.class.reflect_on_all_autosave_associations.each do |reflection|
if association = association_instance_get(reflection.name)
if [:belongs_to, :has_one].include?(reflection.macro)
return true if association.target && association.target.changed_for_autosave?
else
association.target.each {|record| return true if record.changed_for_autosave? }
end
end
end
false
end